diff options
author | Nathan Hjelm <hjelmn@google.com> | 2019-08-13 21:11:15 -0700 |
---|---|---|
committer | Nathan Hjelm <hjelmn@google.com> | 2019-08-13 21:22:48 -0700 |
commit | afadbc7a89f49b70a09d0d809853777ce3a135bf (patch) | |
tree | 11e1e75439095df39654a954bdf2a87ef9894931 /libusb/version_nano.h | |
parent | a5990ab10f68e5ec7498f627d1664b1f842fec4e (diff) | |
download | libusb-afadbc7a89f49b70a09d0d809853777ce3a135bf.tar.gz |
core: abandon sync transfers after libusb_close()
This commit adds an additional check to synchronous transfer
progression to prevent accessing a potentially deleted context. This
access can occur if a code calls libusb_close() then libusb_exit()
from one thread while another thread is in a synchronous transfer.
Note that this is likely a user error. The application should wait
for all transfers to complete before calling libusb_close(). This
commit is being offered as a best-effort attempt to prevent the
invalid access and return a useful error to the application.
There may still be a window where an invalid access is possible.
This commit is a work around until a better fix is available.
References #610
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
Diffstat (limited to 'libusb/version_nano.h')
-rw-r--r-- | libusb/version_nano.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 8aa1efc..1ff7ca7 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11389 +#define LIBUSB_NANO 11390 |