Free f_prog_log on error in MakeVowelLists.

This commit is contained in:
Reece H. Dunn
2015-10-04 15:37:30 +01:00
parent a77a4330ec
commit 66eaac1d6c
+3
View File
@@ -585,7 +585,10 @@ void MakeVowelLists(void)
ix = GetFileLength(fname);
prog_log_table = (PHONEME_PROG_LOG *)malloc(ix);
if(prog_log_table == NULL)
{
fclose(f_prog_log);
return;
}
ix = fread(prog_log_table, 1, ix, f_prog_log);
fclose(f_prog_log);
n_prog_log = ix / sizeof(PHONEME_PROG_LOG);