diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2015-12-21 21:06:52 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2015-12-21 21:06:52 +0100 |
commit | de329963fce3df3075a0c90f66d81f368bdcd514 (patch) | |
tree | 5ff00aefa9d798c65e3ed26e8fc06d50b761e9d5 /libgphoto2_port/libusb1 | |
parent | 020964a20534e908b2d04a8e5bef8e6aafe338db (diff) | |
download | libgphoto2-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.c | 3 |
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; } |