From 49cd9fbc879e24829c2d24ceb190434522d62d93 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 14 Aug 2023 15:41:40 +0200 Subject: [PATCH] Set pointer to NULL after free() Only when not a local variable. --- src/io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/io.c b/src/io.c index 83a2c15f..e9876f0f 100644 --- a/src/io.c +++ b/src/io.c @@ -104,6 +104,7 @@ static void destroy_ssl_locks(void) for (i = 0; i < CRYPTO_num_locks(); i++) pthread_mutex_destroy(&lockarray[i]); OPENSSL_free(lockarray); + lockarray = NULL; } #else static void init_ssl_locks(void)