]>
Commit | Line | Data |
---|---|---|
02cac482 AM |
1 | |
2 | # HG changeset patch | |
3 | # User Timo Sirainen <tss@iki.fi> | |
4 | # Date 1218576446 14400 | |
5 | # Node ID 0e880665fcba80d9742f0284064a71675d973844 | |
6 | # Parent cb794b356034c1ab7220bb958a0907d631291f9b | |
7 | Master process leaked one fd to login process. Typically it was listener fd, | |
8 | which caused imap-login processes existing after Dovecot was killed to | |
9 | keep the port reserved so Dovecot couldn't be started again. | |
10 | ||
11 | --- a/src/login-common/main.c Tue Aug 12 15:37:59 2008 -0400 | |
12 | +++ b/src/login-common/main.c Tue Aug 12 17:27:26 2008 -0400 | |
13 | @@ -402,7 +402,7 @@ int main(int argc ATTR_UNUSED, char *arg | |
14 | env = getenv("SSL_LISTEN_FDS"); | |
15 | if (env != NULL) i += atoi(env); | |
16 | ||
17 | - fd_debug_verify_leaks(i + 1, 1024); | |
18 | + fd_debug_verify_leaks(i, 1024); | |
19 | } | |
20 | #endif | |
21 | /* clear all allocated memory before freeing it. this makes the login | |
22 | --- a/src/master/login-process.c Tue Aug 12 15:37:59 2008 -0400 | |
23 | +++ b/src/master/login-process.c Tue Aug 12 17:27:26 2008 -0400 | |
24 | @@ -666,7 +666,7 @@ static pid_t create_login_process(struct | |
25 | i_fatal("Failed to dup2() fds"); | |
26 | ||
27 | /* don't close any of these */ | |
28 | - for (tmp_fd = 0; tmp_fd <= cur_fd; tmp_fd++) | |
29 | + for (tmp_fd = 0; tmp_fd < cur_fd; tmp_fd++) | |
30 | fd_close_on_exec(tmp_fd, FALSE); | |
31 | ||
32 | (void)close(fd[0]); | |
33 |