dovecot-2.2: lib-storage: Added more asserts to catch missing ma...

dovecot at dovecot.org dovecot at dovecot.org
Wed Feb 20 15:53:24 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/990ff0e1eb6a
changeset: 15860:990ff0e1eb6a
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Feb 20 15:49:06 2013 +0200
description:
lib-storage: Added more asserts to catch missing mail_save_context frees.
Arguably mail_save_context could already freed at this time, but some other
code relies on this as well. These could be removed later if this is no
longer true.

diffstat:

 src/lib-storage/mail-storage.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (27 lines):

diff -r e383647dc9dd -r 990ff0e1eb6a src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Wed Feb 20 15:41:17 2013 +0200
+++ b/src/lib-storage/mail-storage.c	Wed Feb 20 15:49:06 2013 +0200
@@ -1954,6 +1954,7 @@
 	}
 	if (keywords != NULL)
 		mailbox_keywords_unref(&keywords);
+	i_assert(!ctx->unfinished);
 	return ret;
 }
 
@@ -1974,6 +1975,7 @@
 		mail = (struct mail_private *)ctx->dest_mail;
 		mail->v.close(&mail->mail);
 	}
+	i_assert(!ctx->unfinished);
 }
 
 struct mailbox_transaction_context *
@@ -2010,6 +2012,7 @@
 	}
 	if (keywords != NULL)
 		mailbox_keywords_unref(&keywords);
+	i_assert(!ctx->unfinished);
 	return ret;
 }
 


More information about the dovecot-cvs mailing list