]> 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 17:00:14 +0000 (17:00 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 18 May 2012 17:00:14 +0000 (17:00 +0000)
commit483f47dc9e3e13fd671e90f95df9128175b5fd0e
treed0e145214bd114b49073279c8f040a9ac371a144
parent3207c314a79eda6d91e78ba94f102348e489efa4
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)
........

Merged revisions 367002 from http://svn.asterisk.org/svn/asterisk/branches/1.8

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