From 0dd578ce6890104dc424392ad9c534ea2d09d65f Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Mon, 6 Apr 2026 16:48:18 -0700 Subject: [PATCH] nasmlib/alloc.c: no reason to clear q in nasm_free() q is passed in by reference and the value of q is never examined, so there is absolutely no reason to set q = NULL in nasm_free(). Signed-off-by: H. Peter Anvin (Intel) --- nasmlib/alloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nasmlib/alloc.c b/nasmlib/alloc.c index b77d48217..32e181e76 100644 --- a/nasmlib/alloc.c +++ b/nasmlib/alloc.c @@ -74,10 +74,8 @@ void *nasm_realloc(void *q, size_t size) void nasm_free(void *q) { - if (q){ + if (q) free(q); - q = NULL; - } } char *nasm_strdup(const char *s)