[dovecot-cvs] dovecot/src/lib-index mail-index.c,1.223,1.224

cras at dovecot.org cras at dovecot.org
Fri Feb 24 14:26:23 EET 2006


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

Modified Files:
	mail-index.c 
Log Message:
If transaction log opening fails, don't crash when trying to move it to
memory.



Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- mail-index.c	17 Feb 2006 23:36:38 -0000	1.223
+++ mail-index.c	24 Feb 2006 12:26:21 -0000	1.224
@@ -1759,9 +1759,11 @@
 	index->map = map;
 	index->hdr = &map->hdr;
 
-	/* move transaction log to memory */
-	if (mail_transaction_log_move_to_memory(index->log) < 0)
-		ret = -1;
+	if (index->log != NULL) {
+		/* move transaction log to memory */
+		if (mail_transaction_log_move_to_memory(index->log) < 0)
+			ret = -1;
+	}
 
 	/* close the index file. */
 	if (close(index->fd) < 0)



More information about the dovecot-cvs mailing list