[dovecot-cvs] dovecot/src/lib data-stack.c,1.6,1.7

cras at procontrol.fi cras at procontrol.fi
Sun Dec 1 19:58:21 EET 2002


Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv23368/lib

Modified Files:
	data-stack.c 
Log Message:
crashfix when DEBUG was set.



Index: data-stack.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/data-stack.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- data-stack.c	1 Dec 2002 15:45:49 -0000	1.6
+++ data-stack.c	1 Dec 2002 17:58:19 -0000	1.7
@@ -119,11 +119,13 @@
 	   unused_block, replace it */
 	while (block != NULL) {
 		if (unused_block == NULL || block->size > unused_block->size) {
+			if (unused_block != NULL) {
 #ifdef DEBUG
-			i_warning("Shrinking data stack with: %"PRIuSIZE_T,
-				  unused_block->size);
+				i_warning("Shrinking data stack with: "
+					  "%"PRIuSIZE_T, unused_block->size);
 #endif
-			free(unused_block);
+				free(unused_block);
+			}
 			unused_block = block;
 		} else {
 #ifdef DEBUG




More information about the dovecot-cvs mailing list