aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorgrischka <grischka>2016-11-11 18:29:45 +0100
committergrischka <grischka>2016-11-11 18:29:45 +0100
commit7c28c9b13f7c924c18920b51f42b1119c3b1e2ee (patch)
treee806c9b80c58575369d39e21aa1c3e7d1d224896 /tccpp.c
parent7e7f2e5d1b40231f56fb1153a2831a216396a2ac (diff)
downloadtinycc-7c28c9b13f7c924c18920b51f42b1119c3b1e2ee.tar.gz
tinycc-7c28c9b13f7c924c18920b51f42b1119c3b1e2ee.tar.bz2
tccgen: inline_functions double free fix
Fix double free of the inline function token_string which could happen when an error/longjmp occurred while compiling the inline function.
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tccpp.c b/tccpp.c
index b75603f..0bfeaeb 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -1124,8 +1124,7 @@ ST_FUNC void end_macro(void)
str->alloc = 3; /* just mark as finished */
} else {
tok_str_free(str->str);
- if (str->alloc == 1)
- tal_free(tokstr_alloc, str);
+ tal_free(tokstr_alloc, str);
}
}