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
This commit is contained in:
Hans Petter Selasky 2020-01-30 17:30:04 +00:00
parent e48813009c
commit cca46c5e69

View File

@ -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;
}