Skip to content

Commit 61715e4

Browse files
committed
Add free to offset malloc in semaphore_create
1 parent 26b558b commit 61715e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/semaphore.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ _dispatch_thread_semaphore_dispose(_dispatch_thread_semaphore_t sema)
740740
#elif USE_POSIX_SEM
741741
sem_t *s4 = (sem_t*)sema;
742742
int ret = sem_destroy(s4);
743+
free(s4);
743744
DISPATCH_SEMAPHORE_VERIFY_RET(ret);
744745
#elif USE_WIN32_SEM
745746
// XXX: signal the semaphore?

0 commit comments

Comments
 (0)