diff options
-rw-r--r-- | res/res_agi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index b5d1fe8a9..977dbd6d7 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -493,6 +493,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 */ @@ -2752,6 +2756,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) { |