dovecot: Memory leak fixes

dovecot at dovecot.org dovecot at dovecot.org
Sun Dec 9 16:08:29 EET 2007


details:   http://hg.dovecot.org/dovecot/rev/d373913cd763
changeset: 6980:d373913cd763
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Dec 09 16:08:25 2007 +0200
description:
Memory leak fixes

diffstat:

2 files changed, 4 insertions(+), 1 deletion(-)
src/lib-storage/index/dbox/dbox-sync.c     |    1 +
src/lib-storage/index/index-mail-headers.c |    4 +++-

diffs (26 lines):

diff -r 1029b2ffad2d -r d373913cd763 src/lib-storage/index/dbox/dbox-sync.c
--- 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 @@ static int dbox_sync_index(struct dbox_s
 		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;
diff -r 1029b2ffad2d -r d373913cd763 src/lib-storage/index/index-mail-headers.c
--- 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 @@ int index_mail_headers_get_envelope(stru
 	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


More information about the dovecot-cvs mailing list