# HG changeset patch # User Timo Sirainen # Date 1223320000 -10800 # Node ID 96dfe8fb57b8e061b4339cbf3d50fc8067dc50ec # Parent 9f95b3c28cc392b6c9534a69e6a2aa75ea54f5eb Expire plugin was crashing because of previous change. --- 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 */