From: Russell Bryant Date: Sun, 11 Jun 2006 14:56:55 +0000 (+0000) Subject: backport a couple of frame leak fixes from the trunk (revisions 33446, 33447) X-Git-Tag: 1.2.10~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c9905312627bd8f307d80d0ca058feb3cc7cade;p=thirdparty%2Fasterisk.git backport a couple of frame leak fixes from the trunk (revisions 33446, 33447) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33449 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_zapbarge.c b/apps/app_zapbarge.c index 10c5c49e5f..9fea023edc 100644 --- a/apps/app_zapbarge.c +++ b/apps/app_zapbarge.c @@ -212,6 +212,7 @@ zapretry: break; if ((f->frametype == AST_FRAME_DTMF) && (f->subclass == '#')) { ret = 0; + ast_frfree(f); break; } else if (fd != chan->fds[0]) { if (f->frametype == AST_FRAME_VOICE) { diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c index ed0c779772..3b284ed80a 100644 --- a/apps/app_zapscan.c +++ b/apps/app_zapscan.c @@ -269,6 +269,8 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags) ast_log(LOG_WARNING, "Failed to read frame: %s\n", strerror(errno)); } } + if (f) + ast_frfree(f); if (fd != chan->fds[0]) close(fd); else {