From: bellard Date: Wed, 19 Jul 2006 17:54:57 +0000 (+0000) Subject: Linux compilation fix X-Git-Tag: release_0_9_1~1829 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=97f7caf2bcae78e8cd38ec7916fb7883fcdd834b;p=qemu-xen-3.3-testing.git Linux compilation fix --- diff --git a/usb-linux.c b/usb-linux.c index aa1ded23..420382be 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -26,6 +26,7 @@ #if defined(__linux__) #include #include +#include #include #include @@ -59,6 +60,14 @@ typedef struct USBHostDevice { static void usb_host_handle_reset(USBDevice *dev, int destroy) { + USBHostDevice *s = (USBHostDevice *)dev; + + if (destroy) { + if (s->fd >= 0) + close(s->fd); + qemu_free(s); + return; + } #if 0 USBHostDevice *s = (USBHostDevice *)dev; /* USBDEVFS_RESET, but not the first time as it has already be