Commit 96e55e7c authored by Ralph Giles's avatar Ralph Giles

Fix two leaks of the output filename.

This isn't all of them, by any stretch, but they are
the ones which were easy to trigger when the output
file could not be opened. Helps with valgrind cleanness.

svn path=/trunk/vorbis-tools/; revision=18449
parent 86917fca
......@@ -403,6 +403,7 @@ int main(int argc, char **argv)
if(!infile) {
fclose(outfile);
free(outfilename);
return 1;
}
if(decode_file(infile, outfile, infilename, outfilename)) {
......@@ -444,8 +445,11 @@ int main(int argc, char **argv)
}
infile = open_input(in);
if(!infile)
if(!infile) {
if(outfilename)
free(outfilename);
return 1;
}
outfile = open_output(out);
if(!outfile) {
fclose(infile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment