Skip to content

Commit

Permalink
free descs array to avoid leak (Coverity)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmeissner committed Sep 3, 2013
1 parent ecb571a commit aa7e52c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libgphoto2_port/libusb1/libusb1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit aa7e52c

Please sign in to comment.