mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Fix the realloc usage of mbrola_tab in LoadMbrolaTable(synth_mbrola.c) [msvc /analyze]
This commit is contained in:
@@ -107,11 +107,13 @@ espeak_ng_STATUS LoadMbrolaTable(const char *mbrola_voice, const char *phtrans,
|
||||
return error;
|
||||
}
|
||||
|
||||
if ((mbrola_tab = (MBROLA_TAB *)realloc(mbrola_tab, size)) == NULL) {
|
||||
MBROLA_TAB *new_mbrola_tab = (MBROLA_TAB *)realloc(mbrola_tab, size);
|
||||
if (new_mbrola_tab == NULL) {
|
||||
fclose(f_in);
|
||||
close_MBR();
|
||||
return ENOMEM;
|
||||
}
|
||||
mbrola_tab = new_mbrola_tab;
|
||||
|
||||
mbrola_control = Read4Bytes(f_in);
|
||||
pw = (int *)mbrola_tab;
|
||||
|
||||
Reference in New Issue
Block a user