dovecot: Don't crash when dict process exists and we receive SIG...

dovecot at dovecot.org dovecot at dovecot.org
Wed Nov 28 09:16:20 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/5f97bba6df15
changeset: 6869:5f97bba6df15
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Nov 28 09:11:30 2007 +0200
description:
Don't crash when dict process exists and we receive SIGHUP.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/master/dict-process.c |    7 +++++--

diffs (17 lines):

diff -r 019ccd4e9888 -r 5f97bba6df15 src/master/dict-process.c
--- a/src/master/dict-process.c	Wed Nov 28 08:57:04 2007 +0200
+++ b/src/master/dict-process.c	Wed Nov 28 09:11:30 2007 +0200
@@ -165,8 +165,11 @@ dict_process_destroyed(struct child_proc
 {
 	struct dict_process *p = (struct dict_process *)process;
 
-	log_unref(p->log);
-	p->log = NULL;
+	if (p->log != NULL) {
+		/* not killed by ourself */
+		log_unref(p->log);
+		p->log = NULL;
+	}
 	(void)dict_process_listen(p);
 }
 


More information about the dovecot-cvs mailing list