summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2009-03-27 15:46:46 +0000
committerJoshua Colp <jcolp@digium.com>2009-03-27 15:46:46 +0000
commit9ff9df1369ec5fe665db4afe42df21d391ded3f6 (patch)
treedb1afc0b41a19025fa9f0d4952b959cc9a4f01e1 /res
parent39a09b0af95317e1fa9660435cf35595cc764a52 (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@184673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 8a128e2a2..efd8549b3 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -737,6 +737,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 */
@@ -2929,6 +2933,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) {