preproc: fix use of free() instead of nasm_free()
free() and nasm_free() are required to be compatible (as we may end up having memory allocated on the heap by the C library), but that doesn't mean we shouldn't use it whereever possible to allow for better debugging. Fixes: https://bugzilla.nasm.us/show_bug.cgi?id=3392804 Reported-by: C. Masloch <pushbx@ulukai.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
7b8cd67d51
commit
a131b1129c
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
/* ----------------------------------------------------------------------- *
|
||||
*
|
||||
* Copyright 1996-2021 The NASM Authors - All Rights Reserved
|
||||
* Copyright 1996-2022 The NASM Authors - All Rights Reserved
|
||||
* See the file AUTHORS included with the NASM distribution for
|
||||
* the specific copyright holders.
|
||||
*
|
||||
|
@ -1848,7 +1848,7 @@ static Token *new_Token_free(Token * next, enum token_type type,
|
|||
|
||||
if (txtlen <= INLINE_TEXT) {
|
||||
memcpy(t->text.a, text, txtlen);
|
||||
free(text);
|
||||
nasm_free(text);
|
||||
} else {
|
||||
t->text.p.ptr = text;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue