dovecot-2.2: lib: fix memory leak of iterator in str_table_deinit()
dovecot at dovecot.org
dovecot at dovecot.org
Mon Nov 16 10:30:23 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/ae5be2c19fce
changeset: 19364:ae5be2c19fce
user: Phil Carmody <phil at dovecot.fi>
date: Mon Nov 16 12:29:21 2015 +0200
description:
lib: fix memory leak of iterator in str_table_deinit()
The deinit function uses an iterator, but never cleared it up. Found by
Valgrind.
Signed-off-by: Phil Carmody <phil at dovecot.fi>
diffstat:
src/lib/str-table.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 416399bf1643 -r ae5be2c19fce src/lib/str-table.c
--- a/src/lib/str-table.c Mon Nov 16 12:29:09 2015 +0200
+++ b/src/lib/str-table.c Mon Nov 16 12:29:21 2015 +0200
@@ -29,6 +29,7 @@
iter = hash_table_iterate_init(table->hash);
while (hash_table_iterate(iter, table->hash, &key, &value))
i_free(key);
+ hash_table_iterate_deinit(&iter);
hash_table_destroy(&table->hash);
i_free(table);
}
More information about the dovecot-cvs
mailing list