From: Simon Haggett Date: Tue, 10 Jul 2012 15:07:45 +0000 (+0100) Subject: Windows: usbi_cond_destroy() should free handles created by usbi_cond_intwait(). X-Git-Tag: upstream/1.0.21~613 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab1b3843bfd544daa5f907d7b9b4c35dce9411dc;p=platform%2Fupstream%2Flibusb.git 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. --- 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