From: Timo Sirainen Date: Thu, 12 Jun 2014 21:05:16 +0000 (+0300) Subject: doveadm sis deduplicate: Error handling fix if open() fails. X-Git-Tag: 2.2.14.rc1~410 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdb5cc256333e45d4e984433f7c1407fdfcf736a;p=thirdparty%2Fdovecot%2Fcore.git doveadm sis deduplicate: Error handling fix if open() fails. Found by Coverity. --- diff --git a/src/doveadm/doveadm-sis.c b/src/doveadm/doveadm-sis.c index 7966b7de10..1a9e3a05fc 100644 --- a/src/doveadm/doveadm-sis.c +++ b/src/doveadm/doveadm-sis.c @@ -45,7 +45,7 @@ file_contents_equal(const char *path1, const char *path2, ino_t *path2_inode_r) 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);