Skip to content

Commit

Permalink
Close file in error branch
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabiszewski committed Jun 24, 2020
1 parent c9ae1e5 commit 8f056fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/mobitool.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ int dump_cover(const MOBIData *m, const char *fullpath) {
if (count != record->size) {
int errsv = errno;
printf("Error writing to file: %s (%s)\n", cover_path, strerror(errsv));
fclose(file);
return ERROR;
}
fclose(file);
Expand Down

0 comments on commit 8f056fd

Please sign in to comment.