[svn-commits] coreyfarrell: branch 1.8 r419440 - /branches/1.8/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jul 24 12:55:52 CDT 2014


Author: coreyfarrell
Date: Thu Jul 24 12:55:48 2014
New Revision: 419440

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=419440
Log:
chan_sip: sip_subscribe_mwi_destroy should not call sip_destroy

sip_subscribe_mwi_destroy calls sip_destroy on the reference counted
mwi->call.  This results in the fields of mwi->call being freed, but
mwi->call itself it leaked.  If other code is still using mwi->call
it can cause problems.  This change uses dialog_unref instead, to
balance the ref provided by sip_alloc().

ASTERISK-24087 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3834/

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=419440&r1=419439&r2=419440
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Thu Jul 24 12:55:48 2014
@@ -6108,9 +6108,9 @@
 {
 	if (mwi->call) {
 		mwi->call->mwi = NULL;
-		sip_destroy(mwi->call);
-	}
-	
+		mwi->call = dialog_unref(mwi->call, "sip_subscription_mwi destruction");
+	}
+
 	AST_SCHED_DEL(sched, mwi->resub);
 	ast_string_field_free_memory(mwi);
 	ast_free(mwi);




More information about the svn-commits mailing list