diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2012-08-01 12:09:22 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2012-08-01 12:09:22 +0000 |
commit | 3bbcaf73c0deac92b723dac87bbfa54796e29392 (patch) | |
tree | dccb7119062c8b714535e676de6329e1582d4ca8 | |
parent | f598b0e636e53d28b53581400e111fb323f2618b (diff) | |
download | libgphoto2-3bbcaf73c0deac92b723dac87bbfa54796e29392.tar.gz |
set gp-devs and gp_nrofdevs to 0 after freeing, otherwise
we might reuse the freed ones
git-svn-id: https://svn.code.sf.net/p/gphoto/code/branches/libgphoto2-2_4/libgphoto2@14075 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r-- | libgphoto2_port/libusb1/libusb1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libgphoto2_port/libusb1/libusb1.c b/libgphoto2_port/libusb1/libusb1.c index c6a03dc5f..83d25ef4d 100644 --- a/libgphoto2_port/libusb1/libusb1.c +++ b/libgphoto2_port/libusb1/libusb1.c @@ -276,6 +276,7 @@ gp_port_usb_exit (GPPort *port) port->pl = NULL; } if (gp_devs) libusb_free_device_list (gp_devs, 1); + gp_devs = NULL; gp_nrofdevs = 0; free (gp_descs); return (GP_OK); } |