[asterisk-commits] rmudgett: branch 1.4 r222691 - /branches/1.4/channels/chan_misdn.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 7 16:51:27 CDT 2009


Author: rmudgett
Date: Wed Oct  7 16:51:24 2009
New Revision: 222691

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=222691
Log:
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

Modified:
    branches/1.4/channels/chan_misdn.c

Modified: branches/1.4/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_misdn.c?view=diff&rev=222691&r1=222690&r2=222691
==============================================================================
--- branches/1.4/channels/chan_misdn.c (original)
+++ branches/1.4/channels/chan_misdn.c Wed Oct  7 16:51:24 2009
@@ -2715,8 +2715,12 @@
 		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);
  




More information about the asterisk-commits mailing list