From: Timo Sirainen Date: Tue, 6 Jan 2004 06:09:26 +0000 (+0200) Subject: pool_unref(x): don't set (x) = NULL, it may have been allocated from the X-Git-Tag: 1.1.alpha1~4201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf1bf76e55b9f9a0d1952db6eb55bbec3672dd94;p=thirdparty%2Fdovecot%2Fcore.git pool_unref(x): don't set (x) = NULL, it may have been allocated from the pool that was just freed. --HG-- branch : HEAD --- 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)))