dovecot-1.2: master: make sure we don't access freed memory on d...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Feb 10 03:00:18 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/d23ab2c1c0c5
changeset: 8736:d23ab2c1c0c5
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 09 20:00:13 2009 -0500
description:
master: make sure we don't access freed memory on deinit.
diffstat:
1 file changed, 3 insertions(+), 10 deletions(-)
src/master/mail-process.c | 13 +++----------
diffs (22 lines):
diff -r f8fdabb30c0a -r d23ab2c1c0c5 src/master/mail-process.c
--- a/src/master/mail-process.c Mon Feb 09 19:44:07 2009 -0500
+++ b/src/master/mail-process.c Mon Feb 09 20:00:13 2009 -0500
@@ -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);
}
More information about the dovecot-cvs
mailing list