aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2020-08-17 21:30:14 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2020-08-17 21:30:14 +0300
commit8806c3ca007b84accac21dd88b900fb03614ceb7 (patch)
tree5c061d9b09a48d12cdadea97f9eb68ef5b37c6e2 /asm
parent0491fda82f3125090fd8d344f2cc5a10ede780f5 (diff)
downloadnasm-8806c3ca007b84accac21dd88b900fb03614ceb7.tar.gz
nasm-8806c3ca007b84accac21dd88b900fb03614ceb7.tar.xz
nasm-8806c3ca007b84accac21dd88b900fb03614ceb7.zip
BR3392712: pp_tokline: fix double free
Make sure the data being freed get double freed after -- the pointers must be zapped (actually nasm_free and free_tlist support being called with NULL pointer as an argument). Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/preproc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index b46ec17d..b25f275e 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -6751,6 +6751,9 @@ static Token *pp_tokline(void)
free_tlist(m->iline);
nasm_free(m->paramlen);
fm->in_progress = 0;
+ m->params = NULL;
+ m->iline = NULL;
+ m->paramlen = NULL;
}
}