Revision 28695489 hw/xen_domainbuild.c

b/hw/xen_domainbuild.c
211 211
}
212 212

  
213 213
/* normal cleanup */
214
static void xen_domain_cleanup(Notifier *notifier)
214
static void xen_domain_cleanup(void)
215 215
{
216 216
    char *dom;
217 217

  
......
232 232
    unsigned int xenstore_port = 0, console_port = 0;
233 233
    unsigned long xenstore_mfn = 0, console_mfn = 0;
234 234
    int rc;
235
    static Notifier exit_notifier = { .notify = xen_domain_cleanup };
236 235

  
237 236
    memcpy(uuid, qemu_uuid, sizeof(uuid));
238 237
    rc = xc_domain_create(xen_xc, ssidref, uuid, flags, &xen_domid);
......
241 240
        goto err;
242 241
    }
243 242
    qemu_log("xen: created domain %d\n", xen_domid);
244
    exit_notifier_add(&exit_notifier);
243
    atexit(xen_domain_cleanup);
245 244
    if (xen_domain_watcher() == -1) {
246 245
        goto err;
247 246
    }

Also available in: Unified diff