Windows usb: Unlock mutex when shutting down wait thread.

This commit is contained in:
Martin Ling 2013-12-22 17:10:57 +00:00
parent 589edd9b81
commit b5328e1dfa
1 changed files with 1 additions and 0 deletions

View File

@ -304,6 +304,7 @@ SR_PRIV int usb_source_remove(struct sr_context *ctx)
{
#ifdef _WIN32
ctx->usb_thread_running = FALSE;
g_mutex_unlock(&ctx->usb_mutex);
libusb_unlock_events(ctx->libusb_ctx);
g_thread_join(ctx->usb_thread);
g_mutex_clear(&ctx->usb_mutex);