From 53e159fbb77f259b885a759aa5884564140e2f62 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 28 Jul 2013 14:25:06 +0200 Subject: [PATCH] Use sem_del() to destroy semaphores. free() only works by accident and doesn't free the mutexes/condition variables. --- src/tlsproxy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.45.2