From: Mark Michelson Date: Fri, 6 Jul 2012 18:47:05 +0000 (+0000) Subject: Remove a superfluous and dangerous freeing of an SSL_CTX. X-Git-Tag: 10.7.0-rc1~3^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9eb5c1b64fc19fe386eddc9b988f1a1575b03e19;p=thirdparty%2Fasterisk.git Remove a superfluous and dangerous freeing of an SSL_CTX. The problem here is that multiple server sessions share a SSL_CTX. When one session ended, the SSL_CTX would be freed and set NULL, leaving the other sessions unable to function. The code being removed is superfluous because the SSL_CTX structures for servers will be properly freed when ast_ssl_teardown is called. (closes issue ASTERISK-20074) Reported by Trevor Helmsley Patches: ASTERISK-20074.diff uploaded by Mark Michelson (license #5049) Testers: Trevor Helmsley ........ Merged revisions 369731 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@369732 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/tcptls.c b/main/tcptls.c index 797b5815a5..794d133867 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -134,9 +134,6 @@ HOOK_T ast_tcptls_server_write(struct ast_tcptls_session_instance *tcptls_sessio static void session_instance_destructor(void *obj) { struct ast_tcptls_session_instance *i = obj; - if (i->parent && i->parent->tls_cfg) { - ast_ssl_teardown(i->parent->tls_cfg); - } ast_mutex_destroy(&i->lock); }