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 authored and GitLab committed Sep 13, 2016
1 parent b804e2b commit 262eeae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-dict/dict-file.c
Expand Up @@ -533,6 +533,7 @@ file_dict_write_changes(struct dict_transaction_memory_context *ctx,
if (fd == -1) {
*error_r = t_strdup_printf(
"dict-file: creat(%s) failed: %m", temp_path);
file_unlock(&lock);
return -1;
}
break;
Expand Down

0 comments on commit 262eeae

Please sign in to comment.