Skip to content

Commit

Permalink
Merge pull request reverbrain#171 from shaitan/fix
Browse files Browse the repository at this point in the history
Remove temporary file after failed sorted index generation
  • Loading branch information
bioothod committed Apr 26, 2016
2 parents 206bf06 + d8d19d8 commit da0e643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/index.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ int eblob_generate_sorted_index(struct eblob_backend *b, struct eblob_base_ctl *
err_out_free_index:
free(sorted_index);
err_out_close:
/* Remove temporary file ("%s-0.%d.index.tmp"). */
unlink(file);
close(fd);
err_out_free_dst_file:
free(dst_file);
Expand Down

0 comments on commit da0e643

Please sign in to comment.