Revision 5e6b701a

b/hw/xen_console.c
180 180
{
181 181
    struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
182 182
    char *type, *dom;
183
    int ret = 0;
183 184

  
184 185
    /* setup */
185 186
    dom = xs_get_domain_path(xenstore, con->xendev.dom);
......
189 190
    type = xenstore_read_str(con->console, "type");
190 191
    if (!type || strcmp(type, "ioemu") != 0) {
191 192
	xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
192
	return -1;
193
        ret = -1;
194
        goto out;
193 195
    }
194 196

  
195 197
    if (!serial_hds[con->xendev.dev])
......
198 200
    else
199 201
        con->chr = serial_hds[con->xendev.dev];
200 202

  
201
    return 0;
203
out:
204
    qemu_free(type);
205
    return ret;
202 206
}
203 207

  
204 208
static int con_connect(struct XenDevice *xendev)

Also available in: Unified diff