don't leak a frame when breaking out of the main loop of this app
authorRussell Bryant <russell@russellbryant.com>
Sun, 11 Jun 2006 14:44:58 +0000 (14:44 +0000)
committerRussell Bryant <russell@russellbryant.com>
Sun, 11 Jun 2006 14:44:58 +0000 (14:44 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33446 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_zapscan.c

index 64a4f89..b4257d8 100644 (file)
@@ -272,6 +272,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 {