[dovecot-cvs] dovecot/src/lib-index mail-cache-fields.c, 1.3,
1.4 mail-cache.c, 1.43, 1.44
cras at dovecot.org
cras at dovecot.org
Sun Jul 25 00:19:23 EEST 2004
Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv18011
Modified Files:
mail-cache-fields.c mail-cache.c
Log Message:
Allocate cache->fields and cache->fields_file_map with malloc rather than
from pool.
Index: mail-cache-fields.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-cache-fields.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mail-cache-fields.c 20 Jul 2004 17:52:38 -0000 1.3
+++ mail-cache-fields.c 24 Jul 2004 21:19:20 -0000 1.4
@@ -36,11 +36,11 @@
return;
/* @UNSAFE */
- cache->fields = p_realloc(cache->field_pool, cache->fields,
+ cache->fields = i_realloc(cache->fields,
cache->fields_count * sizeof(*cache->fields),
new_idx * sizeof(*cache->fields));
cache->field_file_map =
- p_realloc(cache->field_pool, cache->field_file_map,
+ i_realloc(cache->field_file_map,
cache->fields_count * sizeof(*cache->field_file_map),
new_idx * sizeof(*cache->field_file_map));
Index: mail-cache.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- mail-cache.c 20 Jul 2004 17:55:03 -0000 1.43
+++ mail-cache.c 24 Jul 2004 21:19:20 -0000 1.44
@@ -256,7 +256,9 @@
hash_destroy(cache->field_name_hash);
pool_unref(cache->field_pool);
+ i_free(cache->field_file_map);
i_free(cache->file_field_map);
+ i_free(cache->fields);
i_free(cache->filepath);
i_free(cache);
}
More information about the dovecot-cvs
mailing list