From: Joshua Colp Date: Mon, 3 Dec 2012 14:54:54 +0000 (+0000) Subject: Fix an RTP instance reference count leak in chan_motif. X-Git-Tag: 11.2.0-rc1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5935aaa6ec80acabf7dd81e32918d10796ad39a1;p=thirdparty%2Fasterisk.git Fix an RTP instance reference count leak in chan_motif. When setting up an RTP instance the RTCP portion of the instance keeps a reference to the instance itself. In order to release this reference and stop RTCP the stop API call must be called before destroying the instance. (closes issue ASTERISK-20751) Reported by: joshoa git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@377021 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_motif.c b/channels/chan_motif.c index bfaed50cfd..caa2e7d957 100644 --- a/channels/chan_motif.c +++ b/channels/chan_motif.c @@ -426,10 +426,12 @@ static void jingle_session_destructor(void *obj) } if (session->rtp) { + ast_rtp_instance_stop(session->rtp); ast_rtp_instance_destroy(session->rtp); } if (session->vrtp) { + ast_rtp_instance_stop(session->vrtp); ast_rtp_instance_destroy(session->vrtp); }