Skip to content
Snippets Groups Projects
Commit 99fe70da authored by BJ Weschke's avatar BJ Weschke
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@29706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 6535df36
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment