]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Expire plugin was crashing because of previous change.
authorTimo Sirainen <tss@iki.fi>
Mon, 6 Oct 2008 19:07:23 +0000 (22:07 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 6 Oct 2008 19:07:23 +0000 (22:07 +0300)
--HG--
branch : HEAD

src/plugins/expire/expire-plugin.c

index 0aa603da81b8f2d2136efb99f990caf8659632d6..4658f28e9cb9179228d1feef994dadcb5f13996d 100644 (file)
@@ -99,6 +99,7 @@ expire_mailbox_transaction_commit(struct mailbox_transaction_context *t,
 {
        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 mailbox_transaction_context *t,
                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_EXPIRE_PREFIX, 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 */