From bf1bf76e55b9f9a0d1952db6eb55bbec3672dd94 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 6 Jan 2004 08:09:26 +0200 Subject: [PATCH] pool_unref(x): don't set (x) = NULL, it may have been allocated from the pool that was just freed. --HG-- branch : HEAD --- src/lib/mempool.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/mempool.h b/src/lib/mempool.h index 73b47a40e9..2e09de12bf 100644 --- a/src/lib/mempool.h +++ b/src/lib/mempool.h @@ -49,11 +49,7 @@ pool_t pool_datastack_create(void); /* 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))) -- 2.47.3