From: Matt Caswell Date: Thu, 5 May 2016 19:59:03 +0000 (+0100) Subject: Free any existing SRTP connection profile X-Git-Tag: OpenSSL_1_1_0-pre6~898 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fbdf0299dc98bc611d854c0a62c6ab1810d856fc;p=oweals%2Fopenssl.git Free any existing SRTP connection profile When setting a new SRTP connection profile using SSL_CTX_set_tlsext_use_srtp() or SSL_set_tlsext_use_srtp() we should free any existing profile first to avoid a memory leak. Reviewed-by: Kurt Roeckx --- diff --git a/ssl/d1_srtp.c b/ssl/d1_srtp.c index f969fb10b1..e49aea9be1 100644 --- a/ssl/d1_srtp.c +++ b/ssl/d1_srtp.c @@ -197,6 +197,8 @@ static int ssl_ctx_make_profiles(const char *profiles_string, ptr = col + 1; } while (col); + sk_SRTP_PROTECTION_PROFILE_free(*out); + *out = profiles; return 0;