From: Simon Ruderich Date: Sun, 28 Jul 2013 12:25:06 +0000 (+0200) Subject: Use sem_del() to destroy semaphores. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=53e159fbb77f259b885a759aa5884564140e2f62;p=tlsproxy%2Ftlsproxy.git Use sem_del() to destroy semaphores. free() only works by accident and doesn't free the mutexes/condition variables. --- diff --git a/src/tlsproxy.c b/src/tlsproxy.c index 0eefaa3..7c4f1da 100644 --- a/src/tlsproxy.c +++ b/src/tlsproxy.c @@ -223,9 +223,9 @@ int main(int argc, char **argv) { } } - free(ringbuffer_full); - free(ringbuffer_free); - free(ringbuffer_lock); + sem_del(ringbuffer_full); + sem_del(ringbuffer_free); + sem_del(ringbuffer_lock); free(threads);