changeset 6980:d373913cd763 HEAD

Memory leak fixes
author Timo Sirainen <tss@iki.fi>
date Sun, 09 Dec 2007 16:08:25 +0200
parents 1029b2ffad2d
children 66b439e24c47
files src/lib-storage/index/dbox/dbox-sync.c src/lib-storage/index/index-mail-headers.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-sync.c	Sun Dec 09 16:07:58 2007 +0200
+++ b/src/lib-storage/index/dbox/dbox-sync.c	Sun Dec 09 16:08:25 2007 +0200
@@ -227,6 +227,7 @@
 		box->v.sync_notify(box, 0, 0);
 
 	dbox_sync_unlock_files(ctx);
+	array_free(&ctx->locked_files);
 	hash_destroy(&ctx->syncs);
 	pool_unref(&ctx->pool);
 	return ret;
--- a/src/lib-storage/index/index-mail-headers.c	Sun Dec 09 16:07:58 2007 +0200
+++ b/src/lib-storage/index/index-mail-headers.c	Sun Dec 09 16:08:25 2007 +0200
@@ -455,8 +455,10 @@
 	mail->data.save_envelope = TRUE;
 	header_ctx = mailbox_header_lookup_init(&mail->ibox->box,
 						imap_envelope_headers);
-	if (mail_get_header_stream(&mail->mail.mail, header_ctx, &stream) < 0)
+	if (mail_get_header_stream(&mail->mail.mail, header_ctx, &stream) < 0) {
+		mailbox_header_lookup_deinit(&header_ctx);
 		return -1;
+	}
 
 	if (mail->data.envelope == NULL && stream != NULL) {
 		/* we got the headers from cache - parse them to get the