# HG changeset patch # User Timo Sirainen # Date 1202743214 -7200 # Node ID d5116fa2c88f8fcf52685db3ba1ac18c67aac8f2 # Parent 71af49ba330e2e3ae5b406cfe1c727e8f196de9e Make sure mmap_* variables are reset after munmap() so we don't try to munmap() the memory multiple times. 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 @@ 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)