Skip to content

Commit

Permalink
dict-file: Don't leak a lock on temp file creation failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Oct 13, 2016
1 parent a98be20 commit 67d2a45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-dict/dict-file.c
Expand Up @@ -537,6 +537,7 @@ static int file_dict_write_changes(struct dict_transaction_memory_context *ctx,
if (fd == -1) {
i_error("file dict commit: creat(%s) failed: %m",
temp_path);
file_unlock(&lock);
return -1;
}
break;
Expand Down

0 comments on commit 67d2a45

Please sign in to comment.