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
This commit is contained in:
Russell Bryant
2006-06-11 14:56:55 +00:00
parent 9d9a6da961
commit 9c99053126
2 changed files with 3 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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 {