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) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel) 2026-04-06 16:48:18 -07:00
parent 8d4733962e
commit 0dd578ce68

View file

@ -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)