Memory and fd leak fixes - ID: 3436668

http://sourceforge.net/tracker/?func=detail&aid=3436668&group_id=13478&atid=313478
This commit is contained in:
Erik de Castro Lopo
2012-02-04 17:30:57 +11:00
parent 0fe9767ebb
commit 8f95634bd9
4 changed files with 10 additions and 1 deletions

View File

@@ -352,8 +352,10 @@ static bool write_chain_(FLAC::Metadata::Chain &chain, bool use_padding, bool pr
FILE *file = fopen(filename, "r+b");
if(0 == file)
return false; /*@@@@ chain status still says OK though */
if(!chain.write(use_padding, (::FLAC__IOHandle)file, callbacks))
if(!chain.write(use_padding, (::FLAC__IOHandle)file, callbacks)) {
fclose(file);
return false;
}
fclose(file);
}
}