From: Michael Jerris Date: Mon, 4 May 2015 15:23:33 +0000 (-0400) Subject: FS-7425: #resolve dhparams might not be present, causing a seg. Make sure they are... X-Git-Tag: v1.4.19~6^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b322bd952c814c63c2c151f7ad62e74d45afa66;p=thirdparty%2Ffreeswitch.git FS-7425: #resolve dhparams might not be present, causing a seg. Make sure they are there before we apply them --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 81f98585fc..0416d153d3 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -3127,8 +3127,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_dtls(switch_rtp_t *rtp_session, d bio = BIO_new_file(dtls->pem, "r"); dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); BIO_free(bio); - SSL_CTX_set_tmp_dh(dtls->ssl_ctx, dh); - DH_free(dh); + if (dh) { + SSL_CTX_set_tmp_dh(dtls->ssl_ctx, dh); + DH_free(dh); + } SSL_CTX_set_mode(dtls->ssl_ctx, SSL_MODE_AUTO_RETRY);