dovecot-2.2: fs-posix: Don't try to unlink() the temp file twice...

dovecot at dovecot.org dovecot at dovecot.org
Mon Mar 9 17:29:50 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/5bd6e2eee650
changeset: 18316:5bd6e2eee650
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Mar 09 19:29:04 2015 +0200
description:
fs-posix: Don't try to unlink() the temp file twice after failure.

diffstat:

 src/lib-fs/fs-posix.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 4d19d56e09fb -r 5bd6e2eee650 src/lib-fs/fs-posix.c
--- a/src/lib-fs/fs-posix.c	Mon Mar 09 17:36:11 2015 +0200
+++ b/src/lib-fs/fs-posix.c	Mon Mar 09 19:29:04 2015 +0200
@@ -404,6 +404,8 @@
 			fs_set_error(file->file.fs, "unlink(%s) failed: %m",
 				     file->temp_path);
 		}
+		fs_posix_file_close(&file->file);
+		i_free_and_null(file->temp_path);
 		if (ret < 0)
 			return -1;
 		break;


More information about the dovecot-cvs mailing list