mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-15 05:20:06 +08:00
a mem leak fix for "ability to compile multiple *.c files with -c switch"
A new version of the MEM_DEBUG will be submitted next. This version is not depend on the malloc_usable_size() presense in the libc and print a places where a leaked chunks of memory was allocated.
This commit is contained in:
parent
ae09051c81
commit
a98fd13090
9
tcc.c
9
tcc.c
@ -319,14 +319,13 @@ int main(int argc, char **argv)
|
||||
ret = 1;
|
||||
else
|
||||
if (s->output_type == TCC_OUTPUT_OBJ) {
|
||||
const char *outfile = s->outfile;
|
||||
if (!outfile)
|
||||
outfile = default_outputfile(s, filename);
|
||||
ret = !!tcc_output_file(s, outfile);
|
||||
if (!s->outfile)
|
||||
s->outfile = default_outputfile(s, filename);
|
||||
ret = !!tcc_output_file(s, s->outfile);
|
||||
if (!ret) {
|
||||
/* dump collected dependencies */
|
||||
if (s->gen_deps)
|
||||
gen_makedeps(s, outfile, s->deps_outfile);
|
||||
gen_makedeps(s, s->outfile, s->deps_outfile);
|
||||
if ((i+1) < s->nb_files) {
|
||||
tcc_delete(s);
|
||||
s = tcc_new();
|
||||
|
Loading…
Reference in New Issue
Block a user