From: Timo Sirainen Date: Tue, 10 Feb 2009 01:00:13 +0000 (-0500) Subject: master: make sure we don't access freed memory on deinit. X-Git-Tag: 1.2.beta1~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d762d9ea0dbcefa67862f498624fa18fa995248;p=thirdparty%2Fdovecot%2Fcore.git master: make sure we don't access freed memory on deinit. --HG-- branch : HEAD --- diff --git a/src/master/mail-process.c b/src/master/mail-process.c index 626b7944d8..875df684b5 100644 --- a/src/master/mail-process.c +++ b/src/master/mail-process.c @@ -950,15 +950,8 @@ void mail_processes_init(void) void mail_processes_deinit(void) { - struct hash_iterate_context *iter; - void *key, *value; - - iter = hash_table_iterate_init(mail_process_groups); - while (hash_table_iterate(iter, &key, &value)) { - struct mail_process_group *group = value; - mail_process_group_free(group); - } - hash_table_iterate_deinit(&iter); - + /* don't free() the mail process groups. child_process structs are + still referenced in child-processes and we may need to look them up. + This deinit code needs a redesign.. */ hash_table_destroy(&mail_process_groups); }