From 5013bece3fa8ffb147bf186a1cb9e6ad708341d7 Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Wed, 25 May 2011 15:04:40 -0400 Subject: [PATCH] fix segfault --- src/include/switch_ssl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/switch_ssl.h b/src/include/switch_ssl.h index 4f72192c52..30b3b07ec5 100644 --- a/src/include/switch_ssl.h +++ b/src/include/switch_ssl.h @@ -90,7 +90,9 @@ static inline void switch_ssl_destroy_ssl_locks() if (ssl_count == 0) { CRYPTO_set_locking_callback(NULL); for (i = 0; i < CRYPTO_num_locks(); i++) { - switch_mutex_destroy(ssl_mutexes[i]); + if (ssl_mutexes[i]) { + switch_mutex_destroy(ssl_mutexes[i]); + } } OPENSSL_free(ssl_mutexes);