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:
Dominik Riebeling 2011-11-10 21:12:07 +00:00
parent a3cc428796
commit 8317226ff8

View file

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