Fix leaking file descriptors on error.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25431 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2010-04-01 22:06:52 +00:00
parent 0d6828e064
commit d6543b71af
2 changed files with 7 additions and 3 deletions

View file

@ -207,10 +207,10 @@ bool EncRbSpeex::encode(QString input,QString output)
}
if ((fout = fopen(output.toLocal8Bit(), "wb")) == NULL) {
qDebug() << "Error: could not open output file\n";
fclose(fin);
return false;
}
int ret = encode_file(fin, fout, quality, complexity, narrowband, volume,
errstr, sizeof(errstr));
fclose(fout);