]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
backport a couple of frame leak fixes from the trunk (revisions 33446, 33447)
authorRussell Bryant <russell@russellbryant.com>
Sun, 11 Jun 2006 14:56:55 +0000 (14:56 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 11 Jun 2006 14:56:55 +0000 (14:56 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@33449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_zapbarge.c
apps/app_zapscan.c

index 10c5c49e5f0a10aebf199ffb505e21317d3bd9b9..9fea023edc55420a5cef905e6e9b1d71a0ce3337 100644 (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) {
index ed0c779772544fb1cc2264636a317a18a4e3f28f..3b284ed80a817eb1fa36de548a5480e345eddb60 100644 (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 {