aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-07 22:02:57 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-07 22:02:57 +0000
commitc0b7fe1fd889476553cc7a4c5f37885675b0f431 (patch)
tree08807fb8f205290243ecadd632530c236abb030b /channels
parent18109e0deb6d756c1bdd99743a7996004bd8017b (diff)
Merged revisions 222692 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r222692 | rmudgett | 2009-10-07 16:56:36 -0500 (Wed, 07 Oct 2009) | 21 lines Merged revisions 222691 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222691 | rmudgett | 2009-10-07 16:51:24 -0500 (Wed, 07 Oct 2009) | 14 lines chan_misdn.c:process_ast_dsp() memory leak misdn.conf: astdtmf must be set to "yes". With "no", buffer loss does not occur. The translated frame "f2" when passing through ast_dsp_process() is not freed whenever it is not used further in process_ast_dsp(). Then in the end it is never ever freed. Patches: translate.patch JIRA ABE-1993 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@222694 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_misdn.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index da0f51161..91f2b3bcf 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -2913,8 +2913,12 @@ static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame
return NULL;
}
- if (!f || (f->frametype != AST_FRAME_DTMF))
- return frame;
+ if (!f || (f->frametype != AST_FRAME_DTMF)) {
+ if (f) {
+ ast_frfree(f);
+ }
+ return frame;
+ }
ast_debug(1, "Detected inband DTMF digit: %c\n", f->subclass);