[asterisk-commits] kmoore: branch 12 r418715 - /branches/12/main/bridge_channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 15 18:03:07 CDT 2014


Author: kmoore
Date: Tue Jul 15 18:03:04 2014
New Revision: 418715

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418715
Log:
TEST_FRAMEWORK: Fix ref leak in feature activation

This fixes two reference leaks that would occur when TEST_FRAMEWORK was
enabled and features were successfully executed.

Modified:
    branches/12/main/bridge_channel.c

Modified: branches/12/main/bridge_channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/bridge_channel.c?view=diff&rev=418715&r1=418714&r2=418715
==============================================================================
--- branches/12/main/bridge_channel.c (original)
+++ branches/12/main/bridge_channel.c Tue Jul 15 18:03:04 2014
@@ -1477,10 +1477,15 @@
 			feature = "automixmon";
 		} else if (!strcmp(dtmf, featuremap->parkcall)) {
 			feature = "parkcall";
-		} else if (!strcmp(dtmf, xfer->atxferthreeway)) {
+		}
+	} else if (xfer) {
+		if (!strcmp(dtmf, xfer->atxferthreeway)) {
 			feature = "atxferthreeway";
 		}
 	}
+
+	ao2_cleanup(featuremap);
+	ao2_cleanup(xfer);
 
 	ast_test_suite_event_notify("FEATURE_DETECTION",
 			"Result: success\r\n"




More information about the asterisk-commits mailing list