Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9615:b7bca02d9ccd HEAD
dict-file: Don't leak fd on deinit.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 22 Sep 2010 18:11:03 +0100 |
parents | e67b892c9ff3 |
children | 9e824012da57 |
files | src/lib-dict/dict-file.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);