[dovecot-cvs] dovecot/src/lib-storage/index index-transaction.c, 1.8, 1.9

cras at dovecot.org cras at dovecot.org
Sat Jul 10 14:15:44 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv2029/lib-storage/index

Modified Files:
	index-transaction.c 
Log Message:
fetch_mail needs to be deinitialized before transaction is
committed or rollbacked



Index: index-transaction.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-transaction.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- index-transaction.c	9 Jul 2004 00:10:38 -0000	1.8
+++ index-transaction.c	10 Jul 2004 11:15:42 -0000	1.9
@@ -19,9 +19,6 @@
 	mail_cache_view_close(t->cache_view);
 	mail_index_view_close(t->trans_view);
 	mail_index_view_unlock(t->ibox->view);
-
-	if (t->fetch_mail.pool != NULL)
-		index_mail_deinit(&t->fetch_mail);
 	i_free(t);
 }
 
@@ -33,6 +30,9 @@
 	uoff_t offset;
 	int ret;
 
+	if (t->fetch_mail.pool != NULL)
+		index_mail_deinit(&t->fetch_mail);
+
 	ret = mail_index_transaction_commit(t->trans, &seq, &offset);
 	if (ret < 0)
 		mail_storage_set_index_error(t->ibox);
@@ -51,6 +51,9 @@
 	struct index_transaction_context *t =
 		(struct index_transaction_context *)_t;
 
+	if (t->fetch_mail.pool != NULL)
+		index_mail_deinit(&t->fetch_mail);
+
 	mail_index_transaction_rollback(t->trans);
 	index_transaction_free(t);
 }



More information about the dovecot-cvs mailing list