aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorgrischka <grischka>2017-02-13 18:23:55 +0100
committergrischka <grischka>2017-02-13 18:23:55 +0100
commit13056da039240a1d418335f6e0506a89fb2d8495 (patch)
treed1b2df29fb002c416cbd898e56035161b1340f01 /tccasm.c
parenta4a20360e9df90bb8a0ed23d113ed5564882de8a (diff)
downloadtinycc-13056da039240a1d418335f6e0506a89fb2d8495.tar.gz
tinycc-13056da039240a1d418335f6e0506a89fb2d8495.tar.bz2
mems & leaks
- define_start: set above preprocess_start because now preprocess_start is defining macros. - free "cmd_include_files" - free defines always (after error-longjmps) - close all files (after error-longjmps) - tccpe.c: free imports always - libtcc.c: call tcc_memstats only after all states have been deleted.
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tccasm.c b/tccasm.c
index 67e9239..b7d5881 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -999,14 +999,13 @@ ST_FUNC int tcc_assemble(TCCState *s1, int do_preprocess)
Sym *define_start;
int ret;
+ define_start = define_stack;
preprocess_start(s1);
/* default section is text */
cur_text_section = text_section;
ind = cur_text_section->data_offset;
- define_start = define_stack;
-
/* an elf symbol of type STT_FILE must be put so that STB_LOCAL
symbols can be safely used */
put_elf_sym(symtab_section, 0, 0,