Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Feb 2020 11:05:14 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r357438 - stable/11/lib/libusb
Message-ID:  <202002031105.013B5EbA060150@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Feb  3 11:05:14 2020
New Revision: 357438
URL: https://svnweb.freebsd.org/changeset/base/357438

Log:
  MFC r357298:
  Add missing mutex unlock in failure case.
  
  Differential Revision:	https://reviews.freebsd.org/D23430
  Submitted by:	cem
  Reported by:	Coverity
  Coverity CID:	1368773
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/lib/libusb/libusb10_hotplug.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libusb/libusb10_hotplug.c
==============================================================================
--- stable/11/lib/libusb/libusb10_hotplug.c	Mon Feb  3 11:04:18 2020	(r357437)
+++ stable/11/lib/libusb/libusb10_hotplug.c	Mon Feb  3 11:05:14 2020	(r357438)
@@ -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;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002031105.013B5EbA060150>