aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-07 21:51:24 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-07 21:51:24 +0000
commite6b95039ea705a3f11b063c490be08aa1f3acc93 (patch)
treead1904079a5eac2b52c1627b32e6ab75420aca0f /channels
parent4cdb6d4b5003bce04db506c1bd94364d85077436 (diff)
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.4@222691 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 489cac428..b9df9f898 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -2715,8 +2715,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_log(LOG_DEBUG, "Detected inband DTMF digit: %c\n", f->subclass);