[asterisk-commits] branch 1.2 - r7823
/branches/1.2/res/res_features.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Jan 5 17:07:09 CST 2006
Author: tilghman
Date: Thu Jan 5 17:07:08 2006
New Revision: 7823
URL: http://svn.digium.com/view/asterisk?rev=7823&view=rev
Log:
Bug 6081 - fix for memory leak, formatting fixes
Modified:
branches/1.2/res/res_features.c
Modified: branches/1.2/res/res_features.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/res/res_features.c?rev=7823&r1=7822&r2=7823&view=diff
==============================================================================
--- branches/1.2/res/res_features.c (original)
+++ branches/1.2/res/res_features.c Thu Jan 5 17:07:08 2006
@@ -940,13 +940,15 @@
app = pbx_findapp(feature->app);
if (app) {
- struct ast_channel *work=chan;
- if (ast_test_flag(feature,AST_FEATURE_FLAG_CALLEE)) work=peer;
+ struct ast_channel *work = chan;
+ if (ast_test_flag(feature, AST_FEATURE_FLAG_CALLEE))
+ work = peer;
res = pbx_exec(work, app, feature->app_args, 1);
- if (res<0) return res;
+ if (res < 0)
+ return res;
} else {
ast_log(LOG_WARNING, "Could not find application (%s)\n", feature->app);
- res = -2;
+ return -2;
}
return FEATURE_RETURN_SUCCESS;
@@ -1572,7 +1574,8 @@
/* See if they need servicing */
f = ast_read(pu->chan);
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
-
+ if (f)
+ ast_frfree(f);
manager_event(EVENT_FLAG_CALL, "ParkedCallGiveUp",
"Exten: %d\r\n"
"Channel: %s\r\n"
More information about the asterisk-commits
mailing list