aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_adsi.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-24 17:07:12 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-24 17:07:12 +0000
commit2794d1de7a94f7716bcb98058a505b17a15cb100 (patch)
tree10a94c5a1cb13b3b23b1b587ad3b938370615efc /res/res_adsi.c
parentf0138f250bc84fc46fc86f9a24bb920d17916bcc (diff)
Merged revisions 89545 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89545 | tilghman | 2007-11-24 10:59:59 -0600 (Sat, 24 Nov 2007) | 5 lines Free some frames that would otherwise leak on error. Reported by: Laureano Patch by: Laureano,tilghman (Closes issue #11351) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89546 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_adsi.c')
-rw-r--r--res/res_adsi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/res/res_adsi.c b/res/res_adsi.c
index 664157c51..149381a0c 100644
--- a/res/res_adsi.c
+++ b/res/res_adsi.c
@@ -179,6 +179,7 @@ static int adsi_careful_send(struct ast_channel *chan, unsigned char *buf, int l
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 */
@@ -242,6 +243,7 @@ static int __adsi_transmit_messages(struct ast_channel *chan, unsigned char **ms
if (!chan->adsicpe)
chan->adsicpe = AST_ADSI_UNAVAILABLE;
errno = ENOSYS;
+ ast_frfree(f);
return -1;
}
}