svn commit: r357298 - head/lib/libusb
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jan 30 17:30:05 UTC 2020
Author: hselasky
Date: Thu Jan 30 17:30:04 2020
New Revision: 357298
URL: https://svnweb.freebsd.org/changeset/base/357298
Log:
Add missing mutex unlock in failure case.
Differential Revision: https://reviews.freebsd.org/D23430
Submitted by: cem
Reported by: Coverity
Coverity CID: 1368773
MFC after: 3 days
Sponsored by: Mellanox Technologies
Modified:
head/lib/libusb/libusb10_hotplug.c
Modified: head/lib/libusb/libusb10_hotplug.c
==============================================================================
--- head/lib/libusb/libusb10_hotplug.c Thu Jan 30 16:38:40 2020 (r357297)
+++ head/lib/libusb/libusb10_hotplug.c Thu Jan 30 17:30:04 2020 (r357298)
@@ -123,8 +123,10 @@ libusb_hotplug_scan(void *arg)
TAILQ_INIT(&hotplug_devs);
if (ctx->hotplug_handler != NO_THREAD) {
- if (libusb_hotplug_enumerate(ctx, &hotplug_devs) < 0)
+ if (libusb_hotplug_enumerate(ctx, &hotplug_devs) < 0) {
+ HOTPLUG_UNLOCK(ctx);
continue;
+ }
} else {
do_loop = 0;
}
More information about the svn-src-all
mailing list