summaryrefslogtreecommitdiff
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-05-18 15:51:16 +0000
committerMatthew Jordan <mjordan@digium.com>2012-05-18 15:51:16 +0000
commit6eb4e81033e61d161558fd7cdb015d54e5ac5501 (patch)
tree297cb73b0df3930d54f022b546b85f56b2cc8dda /channels/chan_dahdi.c
parent7b51320642349100921af1308cb277c21d4fe18c (diff)
Fix more memory leaks
This patch adds to what was fixed in r366880. Specifically, it addresses the following: * chan_sip: dispose of an allocated frame in off nominal code paths in sip_rtp_read * func_odbc: when disposing of an allocated resultset, ensure that any rows that were appended to that resultset are also disposed of * cli: free the created return string buffer in another off nominal code path * chan_dahdi: free a frame that was allocated by the dsp layer if we choose not to process that frame (issue ASTERISK-19665) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1922/ ........ Merged revisions 366944 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366948 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 77b2eb8f0..38a894395 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -9321,6 +9321,7 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast)
} else if (p->dialtone_detect && !p->outgoing && f->frametype == AST_FRAME_VOICE) {
if ((ast_dsp_get_tstate(p->dsp) == DSP_TONE_STATE_DIALTONE) && (ast_dsp_get_tcount(p->dsp) > 9)) {
/* Dialtone detected on inbound call; hangup the channel */
+ ast_frfree(f);
f = NULL;
}
} else if (f->frametype == AST_FRAME_DTMF_BEGIN