mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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
This commit is contained in:
@@ -313,8 +313,9 @@ int ast_speech_unregister(const char *engine_name)
|
|||||||
/* We have our engine... removed it */
|
/* We have our engine... removed it */
|
||||||
AST_RWLIST_REMOVE_CURRENT(list);
|
AST_RWLIST_REMOVE_CURRENT(list);
|
||||||
/* If this was the default engine, we need to pick a new one */
|
/* 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);
|
default_engine = AST_RWLIST_FIRST(&engines);
|
||||||
|
}
|
||||||
ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine_name);
|
ast_verb(2, "Unregistered speech recognition engine '%s'\n", engine_name);
|
||||||
/* All went well */
|
/* All went well */
|
||||||
res = 0;
|
res = 0;
|
||||||
|
Reference in New Issue
Block a user