aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schink <jaylink-dev@marcschink.de>2017-05-25 11:48:52 +0200
committerMarc Schink <jaylink-dev@marcschink.de>2017-07-12 14:30:15 +0200
commit49845af97b0affa412f505d6baf31564dc76a327 (patch)
tree370c7d8dac686cd70f7e3bb4b8929412798149e3
parent39a06e9feadc7d153e7f07ffacf3180d26ce18a9 (diff)
Add missing call to libusb_exit()
Signed-off-by: Marc Schink <jaylink-dev@marcschink.de>
-rw-r--r--libjaylink/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libjaylink/core.c b/libjaylink/core.c
index e2d1e8f..509b89d 100644
--- a/libjaylink/core.c
+++ b/libjaylink/core.c
@@ -143,6 +143,9 @@ JAYLINK_API int jaylink_init(struct jaylink_context **ctx)
ret = jaylink_log_set_domain(context, JAYLINK_LOG_DOMAIN_DEFAULT);
if (ret != JAYLINK_OK) {
+#ifdef HAVE_LIBUSB
+ libusb_exit(context->usb_ctx);
+#endif
#ifdef _WIN32
WSACleanup();
#endif