[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.81, 1.82 mail-index-view.c, 1.49, 1.50 mail-index.c, 1.241, 1.242

cras at dovecot.org cras at dovecot.org
Sun Sep 17 21:34:18 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv25211/lib-index

Modified Files:
	mail-index-transaction.c mail-index-view.c mail-index.c 
Log Message:
Memory leak fixes



Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- mail-index-transaction.c	16 Sep 2006 13:40:17 -0000	1.81
+++ mail-index-transaction.c	17 Sep 2006 18:34:15 -0000	1.82
@@ -60,6 +60,7 @@
 	if (array_is_created(&t->ext_resets))
 		array_free(&t->ext_resets);
 
+	array_free(&t->mail_index_transaction_module_contexts);
 	mail_index_view_transaction_unref(t->view);
 	mail_index_view_close(&t->view);
 	i_free(t);

Index: mail-index-view.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-view.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- mail-index-view.c	10 Sep 2006 12:48:18 -0000	1.49
+++ mail-index-view.c	17 Sep 2006 18:34:15 -0000	1.50
@@ -13,7 +13,10 @@
 	dest->refcount = 1;
 	dest->v = src->v;
 	dest->index = src->index;
-	dest->log_view = mail_transaction_log_view_open(src->index->log);
+	if (src->log_view != NULL) {
+		dest->log_view =
+			mail_transaction_log_view_open(src->index->log);
+	}
 
 	dest->indexid = src->indexid;
 	dest->map = src->map;

Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -d -r1.241 -r1.242
--- mail-index.c	10 Sep 2006 12:48:18 -0000	1.241
+++ mail-index.c	17 Sep 2006 18:34:15 -0000	1.242
@@ -65,6 +65,7 @@
 
 	array_free(&index->sync_lost_handlers);
 	array_free(&index->keywords);
+	array_free(&index->mail_index_module_contexts);
 
 	i_free(index->error);
 	i_free(index->dir);
@@ -115,7 +116,7 @@
 	struct mail_index_registered_ext *rext;
 
 	rext = array_idx_modifiable(&index->extensions, ext_id);
-	i_assert(rext->expunge_handler == NULL);
+	i_assert(rext->expunge_handler == NULL || rext->expunge_handler == cb);
 
 	rext->expunge_handler = cb;
 	rext->expunge_context = context;



More information about the dovecot-cvs mailing list