summaryrefslogtreecommitdiff
path: root/libgphoto2_port/libusb1/libusb1.c
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2013-09-03 07:29:12 +0000
committerMarcus Meissner <marcus@jet.franken.de>2013-09-03 07:29:12 +0000
commit012492f4b2f4a9c8ba03504f6c2342a37348762b (patch)
tree593d776b1b1eb70218b6780fa7989a41f8dc30da /libgphoto2_port/libusb1/libusb1.c
parentf2187959540046a7f1385c37f0713fe4ab7c31ce (diff)
downloadlibgphoto2-012492f4b2f4a9c8ba03504f6c2342a37348762b.tar.gz
free descs array to avoid leak (Coverity)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14540 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/libusb1/libusb1.c')
-rw-r--r--libgphoto2_port/libusb1/libusb1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c
index e035c069f..18a3391ee 100644
--- a/libgphoto2_port/libusb1/libusb1.c
+++ b/libgphoto2_port/libusb1/libusb1.c
@@ -260,6 +260,7 @@ gp_port_library_list (GPPortInfoList *list)
CHECK (gp_port_info_list_append (list, info));
}
libusb_exit (ctx); /* should free all stuff above */
+ free (descs);
return (GP_OK);
}
@@ -481,7 +482,7 @@ gp_port_usb_read(GPPort *port, char *bytes, int size)
static int
gp_port_usb_reset(GPPort *port)
{
- int ret, curread;
+ int ret;
if (!port || !port->pl->dh) {
gp_log (GP_LOG_ERROR, "libusb1", "gp_port_usb_reset: bad parameters");