summaryrefslogtreecommitdiff
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorKevin Harwell <kharwell@digium.com>2015-02-26 17:07:50 +0000
committerKevin Harwell <kharwell@digium.com>2015-02-26 17:07:50 +0000
commit169058e73fbe0b7cb7ff7e57c457093e5296532b (patch)
tree817deace2867dc0d83295d15aa4a538479f42760 /apps/app_chanspy.c
parentde86b30dbaaa616ca1752690c89eaa1bea4798a2 (diff)
app_chanspy, channel: fix frame leaks
Fixed a couple of frame leaks that were found during testing. ASTERISK-24828 #close Reported by: John Hardin Review: https://reviewboard.asterisk.org/r/4445/ ........ Merged revisions 432362 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@432363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 3777c48e9..9080594bf 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -698,6 +698,9 @@ static int channel_spy(struct ast_channel *chan, struct ast_autochan *spyee_auto
while (ast_waitfor(chan, -1) > -1 && csth.spy_audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING) {
if (!(f = ast_read(chan)) || ast_check_hangup(chan)) {
running = -1;
+ if (f) {
+ ast_frfree(f);
+ }
break;
}