From: nasm-bot f. C. G. <gor...@gm...> - 2018-12-26 13:42:16
|
Commit-ID: 532d9f9dcb3bea728debf38d75a12473e75cfdcc Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=532d9f9dcb3bea728debf38d75a12473e75cfdcc Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Tue, 25 Dec 2018 13:11:55 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Tue, 25 Dec 2018 13:11:55 +0300 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: ru...@co... Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- asm/listing.c | 1 + 1 file changed, 1 insertion(+) diff --git a/asm/listing.c b/asm/listing.c index 4d753dbd..b79f11ae 100644 --- a/asm/listing.c +++ b/asm/listing.c @@ -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; } |