diff options
author | Simon Haggett <simon.haggett@realvnc.com> | 2012-07-10 16:07:45 +0100 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-07-17 18:05:20 +0100 |
commit | ab1b3843bfd544daa5f907d7b9b4c35dce9411dc (patch) | |
tree | a09d662a1cb550eadaaf0edd7dee7864617b4246 | |
parent | 1572419e943e80883da9341ca65703124938c3d8 (diff) | |
download | libusb-ab1b3843bfd544daa5f907d7b9b4c35dce9411dc.tar.gz |
Windows: usbi_cond_destroy() should free handles created by usbi_cond_intwait().
* Without this change every call to usbi_cond_destroy() leaks an event handle.
-rw-r--r-- | libusb/os/threads_windows.c | 1 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c index aa05edc..db83a4d 100644 --- a/libusb/os/threads_windows.c +++ b/libusb/os/threads_windows.c @@ -97,6 +97,7 @@ int usbi_cond_destroy(usbi_cond_t *cond) { if(!list_empty(&cond->waiters)) return ((errno=EBUSY )); // (!see above!) list_for_each_entry(pos, &cond->not_waiting, list, struct usbi_cond_perthread) { free(prev_pos); + CloseHandle(pos->event); list_del(&pos->list); prev_pos = pos; } diff --git a/libusb/version_nano.h b/libusb/version_nano.h index e6ad1ad..7238e56 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10538 +#define LIBUSB_NANO 10539 |