summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Haggett <simon.haggett@realvnc.com>2012-07-10 16:07:45 +0100
committerPete Batard <pete@akeo.ie>2012-07-17 18:05:20 +0100
commitab1b3843bfd544daa5f907d7b9b4c35dce9411dc (patch)
treea09d662a1cb550eadaaf0edd7dee7864617b4246
parent1572419e943e80883da9341ca65703124938c3d8 (diff)
downloadlibusb-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.c1
-rw-r--r--libusb/version_nano.h2
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