[dovecot-cvs] dovecot/src/lib mempool.h,1.14,1.15

cras at procontrol.fi cras at procontrol.fi
Tue Jan 6 08:09:29 EET 2004


Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv21742/lib

Modified Files:
	mempool.h 
Log Message:
pool_unref(x): don't set (x) = NULL, it may have been allocated from the
pool that was just freed.



Index: mempool.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/mempool.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mempool.h	21 Sep 2003 16:39:29 -0000	1.14
+++ mempool.h	6 Jan 2004 06:09:26 -0000	1.15
@@ -49,11 +49,7 @@
 /* Pools should be used through these macros: */
 #define pool_get_name(pool) (pool)->get_name(pool)
 #define pool_ref(pool) (pool)->ref(pool)
-#define pool_unref(pool) \
-	STMT_START { \
-          (pool)->unref(pool); \
-          (pool) = NULL; \
-	} STMT_END
+#define pool_unref(pool) (pool)->unref(pool)
 
 #define p_new(pool, type, count) \
 	((type *) p_malloc(pool, sizeof(type) * (count)))



More information about the dovecot-cvs mailing list