dovecot-2.2: lib-fs: Fixed crash in fs-sis if hard linking failed.

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 9 20:09:23 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/7b25994a8cb7
changeset: 17451:7b25994a8cb7
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 09 23:08:18 2014 +0300
description:
lib-fs: Fixed crash in fs-sis if hard linking failed.
(For example because there were too many hard links.)
Pointed out by Pavel Stano

diffstat:

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

diffs (13 lines):

diff -r 1c276f2e59a5 -r 7b25994a8cb7 src/lib-fs/fs-sis.c
--- a/src/lib-fs/fs-sis.c	Mon Jun 09 23:02:52 2014 +0300
+++ b/src/lib-fs/fs-sis.c	Mon Jun 09 23:08:18 2014 +0300
@@ -395,7 +395,8 @@
 			return 1;
 		}
 	}
-	o_stream_unref(&_file->output);
+	if (_file->output != NULL)
+		o_stream_unref(&_file->output);
 
 	if (fs_write_stream_finish(file->super, &file->fs_output) < 0) {
 		fs_sis_file_copy_error(file);


More information about the dovecot-cvs mailing list