Carbon TTS: Fix a memory leak on read error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30961 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a3cc428796
commit
8317226ff8
1 changed files with 1 additions and 0 deletions
|
@ -330,6 +330,7 @@ int TTSCarbon::convertAiffToWav(const char* aiff, const char* wav)
|
||||||
if(fread(buf, 1, filestat.st_size, in) < filestat.st_size) {
|
if(fread(buf, 1, filestat.st_size, in) < filestat.st_size) {
|
||||||
printf("could not read file: not enought bytes read\n");
|
printf("could not read file: not enought bytes read\n");
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
free(buf);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
Loading…
Reference in a new issue