Mercurial > dovecot > core-2.2
changeset 1756:44b90c887345 HEAD
Fixed memory leak after compressing cache file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 07 Sep 2003 17:10:50 +0300 |
parents | d766c93ffb96 |
children | ebc6c417e6bc |
files | src/lib-index/mail-cache.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-cache.c Sun Sep 07 16:56:41 2003 +0300 +++ b/src/lib-index/mail-cache.c Sun Sep 07 17:10:50 2003 +0300 @@ -688,6 +688,9 @@ if (msync(mmap_base, offset, MS_SYNC) < 0) return mail_cache_set_syscall_error(cache, "msync()"); + if (munmap(mmap_base, new_file_size) < 0) + return mail_cache_set_syscall_error(cache, "munmap()"); + if (fdatasync(fd) < 0) return mail_cache_set_syscall_error(cache, "fdatasync()"); return TRUE;