dovecot-1.2: dict-file: Don't leak fd on deinit.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 22 20:11:31 EEST 2010
details: http://hg.dovecot.org/dovecot-1.2/rev/b7bca02d9ccd
changeset: 9615:b7bca02d9ccd
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 22 18:11:03 2010 +0100
description:
dict-file: Don't leak fd on deinit.
diffstat:
src/lib-dict/dict-file.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r e67b892c9ff3 -r b7bca02d9ccd src/lib-dict/dict-file.c
--- a/src/lib-dict/dict-file.c Wed Sep 15 18:42:58 2010 +0100
+++ b/src/lib-dict/dict-file.c Wed Sep 22 18:11:03 2010 +0100
@@ -87,6 +87,10 @@
{
struct file_dict *dict = (struct file_dict *)_dict;
+ if (dict->fd != -1) {
+ if (close(dict->fd) < 0)
+ i_error("close(%s) failed: %m", dict->path);
+ }
hash_table_destroy(&dict->hash);
pool_unref(&dict->hash_pool);
i_free(dict->path);
More information about the dovecot-cvs
mailing list