Browse Source

Fix the realloc usage of mbrola_tab in LoadMbrolaTable(synth_mbrola.c) [msvc /analyze]

master
Reece H. Dunn 9 years ago
parent
commit
9eb6150e64
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/libespeak-ng/synth_mbrola.c

+ 3
- 1
src/libespeak-ng/synth_mbrola.c View File

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

Loading…
Cancel
Save