dovecot-2.1: mdbox: mailbox_copy() didn't properly free the save...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 16 13:33:28 EET 2013


details:   http://hg.dovecot.org/dovecot-2.1/rev/dd0eebe378fe
changeset: 14905:dd0eebe378fe
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 16 13:32:57 2013 +0200
description:
mdbox: mailbox_copy() didn't properly free the save context.

diffstat:

 src/lib-storage/index/dbox-multi/mdbox-save.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 2def25f07ca6 -r dd0eebe378fe src/lib-storage/index/dbox-multi/mdbox-save.c
--- a/src/lib-storage/index/dbox-multi/mdbox-save.c	Fri Feb 08 16:42:21 2013 +0200
+++ b/src/lib-storage/index/dbox-multi/mdbox-save.c	Sat Feb 16 13:32:57 2013 +0200
@@ -426,8 +426,10 @@
 	memset(&rec, 0, sizeof(rec));
 	rec.save_date = ioloop_time;
 	if (mdbox_mail_lookup(src_mbox, mail->transaction->view, mail->seq,
-			      &rec.map_uid) < 0)
+			      &rec.map_uid) < 0) {
+		index_save_context_free(_ctx);
 		return -1;
+	}
 
 	mail_index_lookup_ext(mail->transaction->view, mail->seq,
 			      src_mbox->guid_ext_id, &guid_data, &expunged);
@@ -462,5 +464,6 @@
 
 	if (_ctx->dest_mail != NULL)
 		mail_set_seq_saving(_ctx->dest_mail, ctx->ctx.seq);
+	index_save_context_free(_ctx);
 	return 0;
 }


More information about the dovecot-cvs mailing list