forked from Mirrors/tinycc
tcc_free(table_ident) in preprocess_new() if table_ident != NULL
parent
e2a8fd4520
commit
a429d40f06
1
libtcc.c
1
libtcc.c
|
@ -888,6 +888,7 @@ static void tcc_cleanup(void)
|
||||||
for(i = 0; i < n; i++)
|
for(i = 0; i < n; i++)
|
||||||
tcc_free(table_ident[i]);
|
tcc_free(table_ident[i]);
|
||||||
tcc_free(table_ident);
|
tcc_free(table_ident);
|
||||||
|
table_ident = NULL;
|
||||||
|
|
||||||
/* free sym_pools */
|
/* free sym_pools */
|
||||||
dynarray_reset(&sym_pools, &nb_sym_pools);
|
dynarray_reset(&sym_pools, &nb_sym_pools);
|
||||||
|
|
5
tccpp.c
5
tccpp.c
|
@ -3165,7 +3165,10 @@ ST_FUNC void preprocess_new(void)
|
||||||
isidnum_table[i-CH_EOF] = isid(i) || isnum(i);
|
isidnum_table[i-CH_EOF] = isid(i) || isnum(i);
|
||||||
|
|
||||||
/* add all tokens */
|
/* add all tokens */
|
||||||
table_ident = NULL;
|
if (table_ident) {
|
||||||
|
tcc_free (table_ident);
|
||||||
|
table_ident = NULL;
|
||||||
|
}
|
||||||
memset(hash_ident, 0, TOK_HASH_SIZE * sizeof(TokenSym *));
|
memset(hash_ident, 0, TOK_HASH_SIZE * sizeof(TokenSym *));
|
||||||
|
|
||||||
tok_ident = TOK_IDENT;
|
tok_ident = TOK_IDENT;
|
||||||
|
|
Loading…
Reference in New Issue