]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm sis deduplicate: Error handling fix if open() fails.
authorTimo Sirainen <tss@iki.fi>
Thu, 12 Jun 2014 21:05:16 +0000 (00:05 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 12 Jun 2014 21:05:16 +0000 (00:05 +0300)
Found by Coverity.

src/doveadm/doveadm-sis.c

index 7966b7de10e059cc501fc597d6d7dd2de9d95d07..1a9e3a05fc69ec195f69175072967f5090a74ac3 100644 (file)
@@ -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);