diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-03-07 11:23:08 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-03-07 11:23:08 +0300 |
commit | d34a1085b59e4171dfde4dfcfd2239247c909699 (patch) | |
tree | 9baf861a333b813c8dd09b94cfa49b3f184a0396 /preproc.c | |
parent | 91a65ba2b761fa8e19083a37184301569f70ddc7 (diff) | |
download | nasm-d34a1085b59e4171dfde4dfcfd2239247c909699.tar.gz nasm-d34a1085b59e4171dfde4dfcfd2239247c909699.tar.bz2 nasm-d34a1085b59e4171dfde4dfcfd2239247c909699.zip |
preproc.c: Don't forget to dup filename before free
src_set_fname simply gets copy of pointer (ideally
we need refcounting here) so don't pass the name
which will be freed soon but rather pass a copy.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5006,7 +5006,7 @@ static char *pp_getline(void) /* only set line and file name if there's a next node */ if (i->next) { src_set_linnum(i->lineno); - nasm_free(src_set_fname(i->fname)); + nasm_free(src_set_fname(nasm_strdup(i->fname))); } istk = i->next; list->downlevel(LIST_INCLUDE); |