[dovecot-cvs] dovecot/src/lib-index mail-index-sync-update.c, 1.98,
1.99
cras at dovecot.org
cras at dovecot.org
Tue May 30 11:36:47 EEST 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache-sync-update.c, 1.9,
1.10 mail-cache.c, 1.80, 1.81 mail-index-private.h, 1.69,
1.70 mail-index-sync-update.c, 1.97, 1.98 mail-index-sync.c,
1.73, 1.74 mail-index.c, 1.231, 1.232
- Next message: [dovecot-cvs] dovecot/src/lib file-cache.c,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv6642
Modified Files:
mail-index-sync-update.c
Log Message:
Memory leak fix for last update and some other cleanups
Index: mail-index-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-update.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- mail-index-sync-update.c 30 May 2006 08:36:11 -0000 1.98
+++ mail-index-sync-update.c 30 May 2006 08:36:43 -0000 1.99
@@ -17,18 +17,22 @@
{
struct mail_index_view *view = ctx->view;
+ i_assert(view->map != map);
+
/* if map still exists after this, it's only in views. */
view->map->write_to_disk = FALSE;
mail_index_unmap(view->index, &view->map);
view->map = map;
- view->map->refcount++;
if ((ctx->type & (MAIL_INDEX_SYNC_HANDLER_FILE |
MAIL_INDEX_SYNC_HANDLER_HEAD)) != 0) {
+ i_assert(view->index->map != map);
+
mail_index_unmap(view->index, &view->index->map);
view->index->map = map;
view->index->hdr = &map->hdr;
+ map->refcount++;
if (ctx->type == MAIL_INDEX_SYNC_HANDLER_FILE) {
map->write_to_disk = TRUE;
@@ -770,6 +774,8 @@
map->hdr.log_file_seq = seq;
map->hdr.log_file_ext_offset = offset;
+ i_assert(map->hdr_copy_buf->used <= map->hdr.header_size);
+
if (first_append_uid != 0)
mail_index_update_day_headers(&map->hdr, first_append_uid);
- Previous message: [dovecot-cvs] dovecot/src/lib-index mail-cache-sync-update.c, 1.9,
1.10 mail-cache.c, 1.80, 1.81 mail-index-private.h, 1.69,
1.70 mail-index-sync-update.c, 1.97, 1.98 mail-index-sync.c,
1.73, 1.74 mail-index.c, 1.231, 1.232
- Next message: [dovecot-cvs] dovecot/src/lib file-cache.c,1.12,1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list