diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-02-18 23:13:46 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-02-18 23:13:46 +0000 |
commit | de1d19f511b058b4e5131eadc1344f42c7247e79 (patch) | |
tree | 4792109a9f9c561dee7a10ba1098f33c2335fe6c /res/res_speech.c | |
parent | 6fb7e0ece70d042cb30271ca14c5e6f82fdea2ca (diff) |
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: https://origsvn.digium.com/svn/asterisk/trunk@247841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_speech.c')
-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 5b8e1a474..3f5f96048 100644 --- a/res/res_speech.c +++ b/res/res_speech.c @@ -313,8 +313,9 @@ int ast_speech_unregister(const 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; |