diff options
author | Kinsey Moore <kmoore@digium.com> | 2014-07-15 23:03:40 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2014-07-15 23:03:40 +0000 |
commit | ca587079c011df171c8b0597af1d997845281dbd (patch) | |
tree | b3426964a35d37889ec1cd8b979614f93588e411 /main | |
parent | 4420ce6e5c84f4bb091bb1877dd1158feff2f1c8 (diff) |
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.
........
Merged revisions 418715 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/bridge_channel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/main/bridge_channel.c b/main/bridge_channel.c index 4e1377558..0948928ea 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); |