From: Kinsey Moore Date: Tue, 15 Jul 2014 23:03:04 +0000 (+0000) Subject: TEST_FRAMEWORK: Fix ref leak in feature activation X-Git-Tag: 12.5.0-rc1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e243281b3f3bb809862ecc02c18b6e75ec9958b;p=thirdparty%2Fasterisk.git 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. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418715 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/bridge_channel.c b/main/bridge_channel.c index 3ce5c60e46..873369a26e 100644 --- a/main/bridge_channel.c +++ b/main/bridge_channel.c @@ -1477,11 +1477,16 @@ static void testsuite_notify_feature_success(struct ast_channel *chan, const cha 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" "Feature: %s", feature);