From 8317226ff8ea7a95f228ed2b72c78c1aad2784b6 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 10 Nov 2011 21:12:07 +0000 Subject: Carbon TTS: Fix a memory leak on read error. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30961 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/base/ttscarbon.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rbutil/rbutilqt/base/ttscarbon.cpp b/rbutil/rbutilqt/base/ttscarbon.cpp index 4df6d6368c..ff7709dc63 100644 --- a/rbutil/rbutilqt/base/ttscarbon.cpp +++ b/rbutil/rbutilqt/base/ttscarbon.cpp @@ -330,6 +330,7 @@ int TTSCarbon::convertAiffToWav(const char* aiff, const char* wav) if(fread(buf, 1, filestat.st_size, in) < filestat.st_size) { printf("could not read file: not enought bytes read\n"); fclose(in); + free(buf); return -1; } fclose(in); -- cgit v1.2.3