diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-18 23:15:11 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-18 23:15:11 +0000 |
commit | 68ce093632c0d1f74b9f704b12b6154e858c0d27 (patch) | |
tree | b9d77b4d36ce6da2c6ecb6a5b8c8a6f8d5355af3 /res | |
parent | 41723a76b1e69a6b5e4cf8e71c360e760d0a221c (diff) |
Merged revisions 247841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r247841 | tilghman | 2010-02-18 17:13:46 -0600 (Thu, 18 Feb 2010) | 7 lines
Revert an errant part of a previous cleanup, to fix a memory corruption issue.
(closes issue #16368)
Reported by: thirionjwf
Patches:
res_speech.c.patch uploaded by thirionjwf (license 955)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@247843 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_speech.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_speech.c b/res/res_speech.c index 902955da1..10a1e8989 100644 --- a/res/res_speech.c +++ b/res/res_speech.c @@ -313,8 +313,9 @@ int ast_speech_unregister(char *engine_name) /* We have our engine... removed it */ AST_RWLIST_REMOVE_CURRENT(list); /* If this was the default engine, we need to pick a new one */ - if (!default_engine) + if (engine == default_engine) { default_engine = AST_RWLIST_FIRST(&engines); + } ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine_name); /* All went well */ res = 0; |