diff options
author | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-23 16:37:40 +0000 |
---|---|---|
committer | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-23 16:37:40 +0000 |
commit | ce91a8566df029c10a2cd299d75e08546774556c (patch) | |
tree | 9d1bee1c023f61c5a3db77792ad4749c951dc59f /res/res_features.c | |
parent | 6a4a29231d3308c65068c4c87938afd856a3a252 (diff) |
Merged revisions 29696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r29696 | bweschke | 2006-05-23 11:58:24 -0400 (Tue, 23 May 2006) | 3 lines
Fix a potential leak and correct (hopefully) a segfault under certain conditions. #6784 (vovan and perry testing)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29706 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_features.c')
-rw-r--r-- | res/res_features.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/res/res_features.c b/res/res_features.c index 9596e1f7b..54c9a4c3b 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1363,6 +1363,9 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast * \todo XXX how do we guarantee the latter ? */ featurecode[strlen(featurecode)] = f->subclass; + /* Get rid of the frame before we start doing "stuff" with the channels */ + ast_frfree(f); + f = NULL; config->feature_timer = backup_config.feature_timer; res = ast_feature_interpret(chan, peer, config, featurecode, sense); switch(res) { @@ -1375,10 +1378,8 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast } if (res >= FEATURE_RETURN_PASSDIGITS) { res = 0; - } else { - ast_frfree(f); + } else break; - } hasfeatures = !ast_strlen_zero(chan_featurecode) || !ast_strlen_zero(peer_featurecode); if (hadfeatures && !hasfeatures) { /* Restore backup */ |