summaryrefslogtreecommitdiff
path: root/libusb/os/threads_windows.c
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 /libusb/os/threads_windows.c
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.
Diffstat (limited to 'libusb/os/threads_windows.c')
-rw-r--r--libusb/os/threads_windows.c1
1 files changed, 1 insertions, 0 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;
}