mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-20 19:53:10 +00:00
res_rtp_asterisk: Don't leak memory or reset state if DTLS configuration is set multiple times.
........ Merged revisions 417705 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -902,6 +902,10 @@ static int ast_rtp_dtls_set_configuration(struct ast_rtp_instance *instance, con
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rtp->ssl_ctx) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(rtp->ssl_ctx = SSL_CTX_new(DTLSv1_method()))) {
|
if (!(rtp->ssl_ctx = SSL_CTX_new(DTLSv1_method()))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user