dovecot-2.2: fs-posix: Fixed fs_iter_deinit() when opendir() had...

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 14 08:29:43 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/7d609a1c0a3e
changeset: 17798:7d609a1c0a3e
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 14 11:29:35 2014 +0300
description:
fs-posix: Fixed fs_iter_deinit() when opendir() had failed.

diffstat:

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

diffs (12 lines):

diff -r 736a3f6bd5a8 -r 7d609a1c0a3e src/lib-fs/fs-posix.c
--- a/src/lib-fs/fs-posix.c	Sat Sep 13 23:42:17 2014 +0300
+++ b/src/lib-fs/fs-posix.c	Sun Sep 14 11:29:35 2014 +0300
@@ -734,7 +734,7 @@
 	struct posix_fs_iter *iter = (struct posix_fs_iter *)_iter;
 	int ret = 0;
 
-	if (closedir(iter->dir) < 0 && iter->err == 0) {
+	if (iter->dir != NULL && closedir(iter->dir) < 0 && iter->err == 0) {
 		iter->err = errno;
 		fs_set_error(_iter->fs, "closedir(%s) failed: %m", iter->path);
 	}


More information about the dovecot-cvs mailing list