summaryrefslogtreecommitdiff
path: root/libusb
diff options
context:
space:
mode:
Diffstat (limited to 'libusb')
-rw-r--r--libusb/core.c8
-rw-r--r--libusb/version_nano.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/libusb/core.c b/libusb/core.c
index 4b9ce87..bdf4bb7 100644
--- a/libusb/core.c
+++ b/libusb/core.c
@@ -1876,10 +1876,6 @@ err_free_ctx:
if (ctx == usbi_default_context)
usbi_default_context = NULL;
- usbi_mutex_destroy(&ctx->open_devs_lock);
- usbi_mutex_destroy(&ctx->usb_devs_lock);
- usbi_mutex_destroy(&ctx->hotplug_cbs_lock);
-
usbi_mutex_static_lock(&active_contexts_lock);
list_del (&ctx->list);
usbi_mutex_static_unlock(&active_contexts_lock);
@@ -1891,6 +1887,10 @@ err_free_ctx:
}
usbi_mutex_unlock(&ctx->usb_devs_lock);
+ usbi_mutex_destroy(&ctx->open_devs_lock);
+ usbi_mutex_destroy(&ctx->usb_devs_lock);
+ usbi_mutex_destroy(&ctx->hotplug_cbs_lock);
+
free(ctx);
err_unlock:
usbi_mutex_static_unlock(&default_context_lock);
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 36b7ee4..25194c6 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10810
+#define LIBUSB_NANO 10812