Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7224:d5116fa2c88f HEAD
Make sure mmap_* variables are reset after munmap() so we don't try to
munmap() the memory multiple times.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 11 Feb 2008 17:20:14 +0200 |
parents | 71af49ba330e |
children | 0fe19a3d82a3 |
files | src/plugins/fts-squat/squat-trie.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)