summaryrefslogtreecommitdiff
path: root/libusb/version_nano.h
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@google.com>2021-06-11 22:27:19 -0600
committerNathan Hjelm <hjelmn@google.com>2021-06-11 22:27:19 -0600
commite3dda19b31ee974fd749d55bc97d8bfc0e976bb4 (patch)
tree31abfc36cc895daab1e244f91b8fe11955e52e9f /libusb/version_nano.h
parent5360a17ce7a596b0fb976a1be6a2b51753e87824 (diff)
downloadlibusb-e3dda19b31ee974fd749d55bc97d8bfc0e976bb4.tar.gz
darwin: release device parent reference when re-enumerating device
This commit fixes a dangling device reference that can occur when a device is being re-enumerated. The problem is the code was unconditionally re-caching the parent device which then takes a reference on the parent device. If the field was already populated this reference was not needed. To ensure the code works even if the parent device also changes during the re-enumeration the code release the parent reference and grabs a fresh reference. Fixes #924 Signed-off-by: Nathan Hjelm <hjelmn@google.com>
Diffstat (limited to 'libusb/version_nano.h')
-rw-r--r--libusb/version_nano.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index f375044..1f2431b 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11629
+#define LIBUSB_NANO 11630