[asterisk-commits] trunk r29706 - in /trunk: ./ res/res_features.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue May 23 09:37:40 MST 2006
Author: bweschke
Date: Tue May 23 11:37:40 2006
New Revision: 29706
URL: http://svn.digium.com/view/asterisk?rev=29706&view=rev
Log:
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)
........
Modified:
trunk/ (props changed)
trunk/res/res_features.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?rev=29706&r1=29705&r2=29706&view=diff
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Tue May 23 11:37:40 2006
@@ -1363,6 +1363,9 @@
* \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 @@
}
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 */
More information about the asterisk-commits
mailing list