dovecot-1.1: Expire plugin was crashing because of previous change.

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 6 22:06:44 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/96dfe8fb57b8
changeset: 7927:96dfe8fb57b8
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 06 22:06:40 2008 +0300
description:
Expire plugin was crashing because of previous change.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/plugins/expire/expire-plugin.c |    6 ++++--

diffs (28 lines):

diff -r 9f95b3c28cc3 -r 96dfe8fb57b8 src/plugins/expire/expire-plugin.c
--- a/src/plugins/expire/expire-plugin.c	Mon Oct 06 19:24:03 2008 +0300
+++ b/src/plugins/expire/expire-plugin.c	Mon Oct 06 22:06:40 2008 +0300
@@ -99,6 +99,7 @@ expire_mailbox_transaction_commit(struct
 {
 	struct expire_mailbox *xpr_box = EXPIRE_CONTEXT(t->box);
 	struct expire_transaction_context *xt = EXPIRE_CONTEXT(t);
+	struct mailbox *box = t->box;
 	time_t new_stamp;
 	bool update_dict = FALSE;
 	int ret;
@@ -117,13 +118,14 @@ expire_mailbox_transaction_commit(struct
 		i_free(xt);
 		return -1;
 	}
+	/* transaction is freed now */
+	t = NULL;
 
 	if (xt->first_expunged || xt->saves) T_BEGIN {
 		const char *key, *value;
 
 		key = t_strconcat(DICT_PATH_SHARED, expire.username, "/",
-				  t->box->storage->ns->prefix,
-				  t->box->name, NULL);
+				  box->storage->ns->prefix, box->name, NULL);
 		if (!xt->first_expunged && xt->saves) {
 			/* saved new mails. dict needs to be updated only if
 			   this is the first mail in the database */


More information about the dovecot-cvs mailing list