From 418427fdca28e641ec8f7397eea53751163513de Mon Sep 17 00:00:00 2001 From: file Date: Fri, 27 Mar 2009 15:48:16 +0000 Subject: Merged revisions 184673 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r184673 | file | 2009-03-27 12:46:46 -0300 (Fri, 27 Mar 2009) | 7 lines Fix speech structure leak in the AGI speech recognition integration. The AGI dialplan applications did not destroy the speech structure automatically if it was not destroyed by the running AGI script. They will now do this. (issue LUMENVOX-15) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@184674 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_agi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'res') diff --git a/res/res_agi.c b/res/res_agi.c index 6914d0e81..302a5f5ad 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -499,6 +499,10 @@ static enum agi_result launch_asyncagi(struct ast_channel *chan, char *argv[], i ast_frfree(f); } } + + if (async_agi.speech) { + ast_speech_destroy(async_agi.speech); + } quit: /* notify manager users this channel cannot be controlled anymore by Async AGI */ @@ -2781,6 +2785,9 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi } } } + if (agi->speech) { + ast_speech_destroy(agi->speech); + } /* Notify process */ if (send_sighup) { if (pid > -1) { -- cgit v1.2.3