dovecot-1.2: Master process leaked one fd to login process. Typi...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 13 00:27:41 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/14a061acbb7b
changeset: 8088:14a061acbb7b
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 12 17:27:26 2008 -0400
description:
Master process leaked one fd to login process. Typically it was listener fd,
which caused imap-login processes existing after Dovecot was killed to
keep the port reserved so Dovecot couldn't be started again.

diffstat:

2 files changed, 2 insertions(+), 2 deletions(-)
src/login-common/main.c    |    2 +-
src/master/login-process.c |    2 +-

diffs (24 lines):

diff -r 7a498b73380c -r 14a061acbb7b src/login-common/main.c
--- a/src/login-common/main.c	Tue Aug 12 15:37:59 2008 -0400
+++ b/src/login-common/main.c	Tue Aug 12 17:27:26 2008 -0400
@@ -404,7 +404,7 @@ int main(int argc ATTR_UNUSED, char *arg
 		env = getenv("SSL_LISTEN_FDS");
 		if (env != NULL) i += atoi(env);
 
-		fd_debug_verify_leaks(i + 1, 1024);
+		fd_debug_verify_leaks(i, 1024);
 	}
 #endif
 	/* clear all allocated memory before freeing it. this makes the login
diff -r 7a498b73380c -r 14a061acbb7b src/master/login-process.c
--- a/src/master/login-process.c	Tue Aug 12 15:37:59 2008 -0400
+++ b/src/master/login-process.c	Tue Aug 12 17:27:26 2008 -0400
@@ -691,7 +691,7 @@ static pid_t create_login_process(struct
 		i_fatal("Failed to dup2() fds");
 
 	/* don't close any of these */
-	for (tmp_fd = 0; tmp_fd <= cur_fd; tmp_fd++)
+	for (tmp_fd = 0; tmp_fd < cur_fd; tmp_fd++)
 		fd_close_on_exec(tmp_fd, FALSE);
 
 	(void)close(fd[0]);


More information about the dovecot-cvs mailing list