Fix libusb_device::lock memory leak
authorMichael Plante <michael.plante@gmail.com>
Fri, 26 Feb 2010 01:39:22 +0000 (19:39 -0600)
committerDaniel Drake <dan@reactivated.net>
Thu, 13 May 2010 01:11:32 +0000 (22:11 -0300)
AUTHORS
libusb/core.c

diff --git a/AUTHORS b/AUTHORS
index f855002..105f6b5 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,6 +13,7 @@ Felipe Balbi
 Hans Ulrich Niedermann
 Ludovic Rousseau
 Martin Koegler
+Michael Plante
 Mikhail Gusarov
 Peter Stuge
 Rob Walker
index 0f5b894..e1849af 100644 (file)
@@ -831,6 +831,7 @@ API_EXPORTED void libusb_unref_device(libusb_device *dev)
                list_del(&dev->list);
                usbi_mutex_unlock(&dev->ctx->usb_devs_lock);
 
+               usbi_mutex_destroy(&dev->lock);
                free(dev);
        }
 }