Fix resource leak

This commit is contained in:
Chocobo1 2015-07-11 15:12:55 +08:00
parent bbe51268d3
commit c69e8805e9
1 changed files with 4 additions and 3 deletions

View File

@ -991,6 +991,7 @@ int main(int argc, char* argv[])
if (ret != buf.size())
{
fprintf(stderr, "write returned: %d (expected %d)\n", int(ret), int(buf.size()));
fclose(f);
return 1;
}
printf("wrote %s\n", torrent_name);