[asterisk-commits] tilghman: branch 1.4 r89545 - /branches/1.4/res/res_adsi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Nov 24 11:00:00 CST 2007
Author: tilghman
Date: Sat Nov 24 10:59:59 2007
New Revision: 89545
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89545
Log:
Free some frames that would otherwise leak on error.
Reported by: Laureano
Patch by: Laureano,tilghman
(Closes issue #11351)
Modified:
branches/1.4/res/res_adsi.c
Modified: branches/1.4/res/res_adsi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_adsi.c?view=diff&rev=89545&r1=89544&r2=89545
==============================================================================
--- branches/1.4/res/res_adsi.c (original)
+++ branches/1.4/res/res_adsi.c Sat Nov 24 10:59:59 2007
@@ -168,6 +168,7 @@
/* Read a voice frame */
if (inf->subclass != AST_FORMAT_ULAW) {
ast_log(LOG_WARNING, "Channel not in ulaw?\n");
+ ast_frfree(inf);
return -1;
}
/* Send no more than they sent us */
@@ -182,6 +183,7 @@
outf.samples = amt;
if (ast_write(chan, &outf)) {
ast_log(LOG_WARNING, "Failed to carefully write frame\n");
+ ast_frfree(inf);
return -1;
}
/* Update pointers and lengths */
@@ -256,6 +258,7 @@
if (!chan->adsicpe)
chan->adsicpe = AST_ADSI_UNAVAILABLE;
errno = ENOSYS;
+ ast_frfree(f);
return -1;
}
}
More information about the asterisk-commits
mailing list