summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2008-12-09 21:39:11 +0000
committerDaniel Drake <dsd@gentoo.org>2008-12-09 21:39:11 +0000
commit81a7310d92461ba7b1d98aeff7c4c007fab07120 (patch)
treee88a39bb98e6e5bdde8ba773198fcbe44a06ea90
parent9b4b53453db56ba9c1d707a645bbe6c7a02a3c81 (diff)
downloadlibusb-81a7310d92461ba7b1d98aeff7c4c007fab07120.tar.gz
Fix double free in descriptor parsing error path
Pointed out by Shannon Chuang.
-rw-r--r--libusb/descriptor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libusb/descriptor.c b/libusb/descriptor.c
index 2fed1e9..ce0b661 100644
--- a/libusb/descriptor.c
+++ b/libusb/descriptor.c
@@ -174,6 +174,7 @@ static void clear_interface(struct libusb_interface *interface)
}
}
free((void *) interface->altsetting);
+ interface->altsetting = NULL;
}
}