mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-19 18:00:23 +08:00
listing: list_emit -- Don't forget to zap listerr_head
In list_emit we walk over listerr_head freeing the list, but the head pointer remain carrying old value. Need to clean it up once traverse is done to not access already freed memory later. https://bugzilla.nasm.us/show_bug.cgi?id=3392538 Reported-by: russvz@comcast.net Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
5079ea0b01
commit
532d9f9dcb
@ -128,6 +128,7 @@ static void list_emit(void)
|
||||
fprintf(listfp, " %s\n", le->str);
|
||||
nasm_free(le);
|
||||
}
|
||||
listerr_head = NULL;
|
||||
listerr_tail = &listerr_head;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user