diff options
Diffstat (limited to 'libusb/os/threads_windows.c')
-rw-r--r-- | libusb/os/threads_windows.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c index 0edd6d1..ca600d0 100644 --- a/libusb/os/threads_windows.c +++ b/libusb/os/threads_windows.c @@ -156,7 +156,7 @@ static int __inline usbi_cond_intwait(usbi_cond_t *cond, } } if(!found) { - pos = malloc(sizeof(struct usbi_cond_perthread)); + pos = (struct usbi_cond_perthread*) calloc(1, sizeof(struct usbi_cond_perthread)); if(!pos) return ((errno=ENOMEM)); // This errno is not POSIX-allowed. pos->tid = tid; pos->event = CreateEvent(NULL, FALSE, FALSE, NULL); // auto-reset. |