From: Richard Mudgett Date: Wed, 7 Oct 2009 21:51:24 +0000 (+0000) Subject: chan_misdn.c:process_ast_dsp() memory leak X-Git-Tag: 1.4.27-rc3~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d2cc86d06f93e8fb55836fa8fde53045d7aa66e;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@222691 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 489cac4285..b9df9f898d 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);