dovecot-2.2: doveadm sis deduplicate: Error handling fix if open...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 12 23:20:36 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/c699a3eb0b75
changeset: 17460:c699a3eb0b75
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 13 00:05:16 2014 +0300
description:
doveadm sis deduplicate: Error handling fix if open() fails.
Found by Coverity.

diffstat:

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

diffs (12 lines):

diff -r e279bd060c28 -r c699a3eb0b75 src/doveadm/doveadm-sis.c
--- a/src/doveadm/doveadm-sis.c	Fri Jun 13 00:03:11 2014 +0300
+++ b/src/doveadm/doveadm-sis.c	Fri Jun 13 00:05:16 2014 +0300
@@ -45,7 +45,7 @@
 		return -1;
 	}
 	fd2 = open(path2, O_RDONLY);
-	if (fd1 == -1) {
+	if (fd2 == -1) {
 		if (errno != ENOENT)
 			i_error("open(%s) failed: %m", path2);
 		i_close_fd(&fd1);


More information about the dovecot-cvs mailing list