dovecot-2.0: mail_storage_copy(): Don't unreference keywords too...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Oct 18 22:24:46 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/755e6208d8ce
changeset: 10090: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