changeset 1905:45a656ec68a1 HEAD

pool_unref(x): don't set (x) = NULL, it may have been allocated from the pool that was just freed.
author Timo Sirainen <tss@iki.fi>
date Tue, 06 Jan 2004 08:09:26 +0200
parents 00cc093bb85f
children 956232f5706c
files src/lib/mempool.h
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/mempool.h	Tue Jan 06 07:09:22 2004 +0200
+++ b/src/lib/mempool.h	Tue Jan 06 08:09:26 2004 +0200
@@ -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)))