dovecot: Make sure mmap_* variables are reset after munmap() so ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Feb 11 17:20:18 EET 2008
details: http://hg.dovecot.org/dovecot/rev/d5116fa2c88f
changeset: 7224:d5116fa2c88f
user: Timo Sirainen <tss at iki.fi>
date: Mon Feb 11 17:20:14 2008 +0200
description:
Make sure mmap_* variables are reset after munmap() so we don't try to
munmap() the memory multiple times.
diffstat:
1 file changed, 2 insertions(+)
src/plugins/fts-squat/squat-trie.c | 2 ++
diffs (12 lines):
diff -r 71af49ba330e -r d5116fa2c88f src/plugins/fts-squat/squat-trie.c
--- a/src/plugins/fts-squat/squat-trie.c Mon Feb 11 17:02:43 2008 +0200
+++ b/src/plugins/fts-squat/squat-trie.c Mon Feb 11 17:20:14 2008 +0200
@@ -148,6 +148,8 @@ static void squat_trie_close_fd(struct s
if (trie->mmap_size != 0) {
if (munmap(trie->mmap_base, trie->mmap_size) < 0)
i_error("munmap(%s) failed: %m", trie->path);
+ trie->mmap_base = NULL;
+ trie->mmap_size = 0;
}
if (trie->fd != -1) {
if (close(trie->fd) < 0)
More information about the dovecot-cvs
mailing list