[dovecot-cvs] dovecot/src/lib-index mail-cache.c,1.10,1.11
cras at procontrol.fi
cras at procontrol.fi
Sun Sep 7 18:10:52 EEST 2003
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv15864/lib-index
Modified Files:
mail-cache.c
Log Message:
Fixed memory leak after compressing cache file.
Index: mail-cache.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- mail-cache.c 7 Sep 2003 13:30:24 -0000 1.10
+++ mail-cache.c 7 Sep 2003 14:10:50 -0000 1.11
@@ -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;
More information about the dovecot-cvs
mailing list