diff options
author | Joshua Colp <jcolp@digium.com> | 2017-03-18 05:37:04 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-03-18 05:37:04 -0500 |
commit | 130af0ab8012b9e48794b4427ac48a7c7078189d (patch) | |
tree | 75e242b525b1cadeece9ca1592032bb0cf475255 /res | |
parent | a2d29a754547617c392e6010f8ca930bb3d541de (diff) | |
parent | 7ea7797e12b155a2a447ab2d2d27780538219253 (diff) |
Merge "res_rtp_asterisk: Fix crash when RTCP is not present when DTLS is stopped." into 13
Diffstat (limited to 'res')
-rw-r--r-- | res/res_rtp_asterisk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index b89057cea..efaf654a3 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1577,7 +1577,7 @@ static int ast_rtp_dtls_active(struct ast_rtp_instance *instance) static void ast_rtp_dtls_stop(struct ast_rtp_instance *instance) { struct ast_rtp *rtp = ast_rtp_instance_get_data(instance); - int rtcp_dtls_unique = (rtp->dtls.ssl != rtp->rtcp->dtls.ssl); + SSL *ssl = rtp->dtls.ssl; dtls_srtp_stop_timeout_timer(instance, rtp, 0); @@ -1595,7 +1595,7 @@ static void ast_rtp_dtls_stop(struct ast_rtp_instance *instance) if (rtp->rtcp) { dtls_srtp_stop_timeout_timer(instance, rtp, 1); - if (rtp->rtcp->dtls.ssl && rtcp_dtls_unique) { + if (rtp->rtcp->dtls.ssl && (rtp->rtcp->dtls.ssl != ssl)) { SSL_free(rtp->rtcp->dtls.ssl); rtp->rtcp->dtls.ssl = NULL; ast_mutex_destroy(&rtp->rtcp->dtls.lock); |