From 558d3924ac06ab1da3ae2e6b4a02bf92a3354cb3 Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Sun, 11 Jun 2006 14:52:04 +0000
Subject: [PATCH] don't leak a frame when breaking out of the loop on a timeout

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_speech_utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index 2987b48dfd..c464576f75 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -576,6 +576,8 @@ static int speech_background(struct ast_channel *chan, void *data)
 			time(&current);
 			if ((current-start) >= timeout) {
 				done = 1;
+				if (f)
+					ast_frfree(f);
 				break;
 			}
 		}
-- 
GitLab