diff options
author | Hector Martin | 2010-06-17 18:24:17 +0200 |
---|---|---|
committer | Hector Martin | 2010-06-17 18:24:17 +0200 |
commit | 3ea39bc9c977ddbbcb168f79505e0856942a259d (patch) | |
tree | 8d55243590b973c9028b0c7970c77a16558ab1dd /daemon | |
parent | 7a4ab4e6a6225f06d01405187c19cfa3cb7bd600 (diff) | |
download | usbmuxd-3ea39bc9c977ddbbcb168f79505e0856942a259d.tar.gz usbmuxd-3ea39bc9c977ddbbcb168f79505e0856942a259d.tar.bz2 |
Fix segfault when device initialization fails
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/usb-linux.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/usb-linux.c b/daemon/usb-linux.c index c9420c8..0860b46 100644 --- a/daemon/usb-linux.c +++ b/daemon/usb-linux.c @@ -322,6 +322,7 @@ int usb_discover(void) struct usb_device *usbdev; usbdev = malloc(sizeof(struct usb_device)); + memset(usbdev, 0, sizeof(*usbdev)); for(j=0; j<config->bNumInterfaces; j++) { const struct libusb_interface_descriptor *intf = &config->interface[j].altsetting[0]; |