@@ -1066,6 +1077,7 @@ USBDevice *usb_host_device_open(const char *devname)
qdev_prop_set_uint32(&dev->qdev, "vendorid", filter.vendor_id);
qdev_prop_set_uint32(&dev->qdev, "productid", filter.product_id);
qdev_init_nofail(&dev->qdev);
+ atexit(usb_host_cleanup);
return dev;
You'll register atexit multiple times here (once per device).
I still think this should use exit notifiers, see
http://patchwork.ozlabs.org/patch/54571/ (doesn't apply cleanly and
more, will post a rebased version later today).
cheers,
Gerd