]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix memory leak of SSL_CTX structures in TLS core.
authorMark Michelson <mmichelson@digium.com>
Fri, 18 May 2012 16:53:47 +0000 (16:53 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 18 May 2012 16:53:47 +0000 (16:53 +0000)
commiteef4c097873499b5920c65f04f000664c85791d9
tree1d9e909407f8503f82e1050f9cdd311a4eb747f6
parent67268d9198ef14a3fbf822f46d28ac98a590ed8e
Fix memory leak of SSL_CTX structures in TLS core.

SSL_CTX structures were allocated but never freed. This was a bigger
issue for clients than servers since new SSL_CTX structures could be
allocated for each connection. Servers, on the other hand, typically
set up a single SSL_CTX for their lifetime.

This is solved in two ways:

1. In __ssl_setup(), if a tcptls_cfg has an ssl_ctx on it, it is
freed so that a new one can take its place.
2. A companion to ast_ssl_setup() called ast_ssl_teardown() has
been added so that servers can properly free their SSL_CTXs.

(issue ASTERISK-19278)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@367002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c
include/asterisk/tcptls.h
main/tcptls.c