dovecot-2.0: dict-file: Don't leak fd on deinit.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 22 20:11:07 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/7cf2b8b8a720
changeset: 12152:7cf2b8b8a720
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 ee91aee81d0d -r 7cf2b8b8a720 src/lib-dict/dict-file.c
--- a/src/lib-dict/dict-file.c Tue Sep 21 18:15:56 2010 +0100
+++ b/src/lib-dict/dict-file.c Wed Sep 22 18:11:03 2010 +0100
@@ -89,6 +89,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