dovecot-2.0-sslstream: mail_storage_copy(): Don't unreference ke...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 02:55:09 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0-sslstream/rev/755e6208d8ce
changeset: 10091:755e6208d8ce
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Oct 18 15:23:15 2009 -0400
description:
mail_storage_copy(): Don't unreference keywords too many times.

diffstat:

1 file changed, 6 insertions(+)
src/lib-storage/mail-copy.c |    6 ++++++

diffs (16 lines):

diff -r fc9d62ac86d1 -r 755e6208d8ce src/lib-storage/mail-copy.c
--- a/src/lib-storage/mail-copy.c	Fri Oct 16 15:57:41 2009 -0400
+++ b/src/lib-storage/mail-copy.c	Sun Oct 18 15:23:15 2009 -0400
@@ -48,6 +48,12 @@ int mail_storage_copy(struct mail_save_c
 			break;
 	} while (i_stream_read(input) != -1);
 
+	if (ctx->keywords != NULL) {
+		/* keywords gets unreferenced twice, because we call
+		   mailbox_save_cancel/finish */
+		mailbox_keywords_ref(ctx->transaction->box, ctx->keywords);
+	}
+
 	if (input->stream_errno != 0) {
 		mail_storage_set_critical(ctx->transaction->box->storage,
 					  "copy: i_stream_read() failed: %m");


More information about the dovecot-cvs mailing list