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 <kurt@openssl.org>
master
Matt Caswell 7 years ago
parent 9921b7b6a2
commit fbdf0299dc

@ -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;

Loading…
Cancel
Save