[dovecot-cvs] dovecot/src/lib-storage/index index-mail.c, 1.92,
1.93 index-storage.c, 1.83, 1.84 index-sync.c, 1.55, 1.56
cras at dovecot.org
cras at dovecot.org
Sun Feb 26 13:24:42 EET 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv4215/lib-storage/index
Modified Files:
index-mail.c index-storage.c index-sync.c
Log Message:
Memory leak fixes
Index: index-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-mail.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- index-mail.c 26 Feb 2006 10:05:15 -0000 1.92
+++ index-mail.c 26 Feb 2006 11:24:38 -0000 1.93
@@ -387,7 +387,6 @@
message_parser_parse_body(data->parser_ctx, NULL, NULL, NULL);
}
data->parts = message_parser_deinit(&data->parser_ctx);
- data->parser_ctx = NULL;
if (data->parsed_bodystructure &&
imap_bodystructure_is_plain_7bit(data->parts)) {
@@ -747,6 +746,8 @@
static void index_mail_close(struct index_mail *mail)
{
+ if (mail->data.parser_ctx != NULL)
+ (void)message_parser_deinit(&mail->data.parser_ctx);
if (mail->data.stream != NULL)
i_stream_destroy(&mail->data.stream);
if (mail->data.filter_stream != NULL)
Index: index-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-storage.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- index-storage.c 18 Jan 2006 23:14:44 -0000 1.83
+++ index-storage.c 26 Feb 2006 11:24:38 -0000 1.84
@@ -391,7 +391,9 @@
index_mailbox_check_remove_all(ibox);
if (ibox->index != NULL)
index_storage_unref(ibox->index);
- i_free(ibox->cache_fields);
+ if (ibox->recent_flags != NULL)
+ buffer_free(ibox->recent_flags);
+ i_free(ibox->cache_fields);
pool_unref(box->pool);
}
Index: index-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-sync.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- index-sync.c 5 Feb 2006 07:52:42 -0000 1.55
+++ index-sync.c 26 Feb 2006 11:24:38 -0000 1.56
@@ -21,6 +21,8 @@
unsigned char *p;
size_t dest_idx;
+ i_assert(seq != 0);
+
if (ibox->recent_flags_start_seq == 0) {
ibox->recent_flags = buffer_create_dynamic(default_pool, 128);
ibox->recent_flags_start_seq = seq;
More information about the dovecot-cvs
mailing list