summaryrefslogtreecommitdiff
path: root/libgphoto2_port/libusb1
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2015-12-21 21:06:52 +0100
committerMarcus Meissner <marcus@jet.franken.de>2015-12-21 21:06:52 +0100
commitde329963fce3df3075a0c90f66d81f368bdcd514 (patch)
tree5ff00aefa9d798c65e3ed26e8fc06d50b761e9d5 /libgphoto2_port/libusb1
parent020964a20534e908b2d04a8e5bef8e6aafe338db (diff)
downloadlibgphoto2-de329963fce3df3075a0c90f66d81f368bdcd514.tar.gz
correctly clear out the freed pointers for irqs, irqlens and
and the irqcount on _close (we might just reopen the same port later).
Diffstat (limited to 'libgphoto2_port/libusb1')
-rw-r--r--libgphoto2_port/libusb1/libusb1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c
index 822340185..c4f676ef1 100644
--- a/libgphoto2_port/libusb1/libusb1.c
+++ b/libgphoto2_port/libusb1/libusb1.c
@@ -509,7 +509,10 @@ gp_libusb1_close (GPPort *port)
libusb_close (port->pl->dh);
free (port->pl->irqs);
+ port->pl->irqs = NULL;
free (port->pl->irqlens);
+ port->pl->irqlens = NULL;
+ port->pl->nrofirqs = 0;
port->pl->dh = NULL;
return GP_OK;
}