dect
/
asterisk
Archived
13
0
Fork 0

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/trunk@247841 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
tilghman 2010-02-18 23:13:46 +00:00
parent df209a3f23
commit 7774002c87
1 changed files with 2 additions and 1 deletions

View File

@ -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;