[svn-commits] mjordan: branch 12 r402940 - /branches/12/res/res_pjsip_mwi.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Nov 21 11:49:30 CST 2013
Author: mjordan
Date: Thu Nov 21 11:49:28 2013
New Revision: 402940
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402940
Log:
res_pjsip_mwi: Fix memory leak of MWI subscriptions container
This patch fixes a reference counting memory leak on the ao2_container
created as part of create_mwi_subscriptions. When we create the container
in this routine, the intent is to hand lifetime ownership over to the global
container unsolicited_mwi. When ao2_global_obj_replace_unref is called, the
reference count on mwi_subscriptions (the container) will be bumped by 1;
however, the function does not decrement the reference count on
mwi_subscriptions when this occurs. This will prevent the container from being
fully disposed of when Asterisk exits (or on any subsequent call to this
operation, such as during a reload).
Modified:
branches/12/res/res_pjsip_mwi.c
Modified: branches/12/res/res_pjsip_mwi.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_mwi.c?view=diff&rev=402940&r1=402939&r2=402940
==============================================================================
--- branches/12/res/res_pjsip_mwi.c (original)
+++ branches/12/res/res_pjsip_mwi.c Thu Nov 21 11:49:28 2013
@@ -682,6 +682,7 @@
}
ao2_callback(endpoints, OBJ_NODATA, create_mwi_subscriptions_for_endpoint, mwi_subscriptions);
ao2_global_obj_replace_unref(unsolicited_mwi, mwi_subscriptions);
+ ao2_ref(mwi_subscriptions, -1);
}
static int reload(void)
More information about the svn-commits
mailing list