]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 184673 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Fri, 27 Mar 2009 15:54:22 +0000 (15:54 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 27 Mar 2009 15:54:22 +0000 (15:54 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184675 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_agi.c

index b5d1fe8a966a3ead39a28333d04c8edab25b1fc2..977dbd6d7ec38bd4a98ac04cb30d857cb214caec 100644 (file)
@@ -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) {