restore 2dd8587c2f32d17a2cd0443a60a614a3fa9bbe29

This commit is contained in:
jiang
2014-05-13 22:05:38 +08:00
parent 72f466c24c
commit c6345b5a8a
6 changed files with 248 additions and 111 deletions

View File

@ -868,6 +868,7 @@ LIBTCCAPI void tcc_undefine_symbol(TCCState *s1, const char *sym)
static void tcc_cleanup(void)
{
int i, n;
CSym *def;
if (NULL == tcc_state)
return;
tcc_state = NULL;
@ -877,8 +878,11 @@ static void tcc_cleanup(void)
/* free tokens */
n = tok_ident - TOK_IDENT;
for(i = 0; i < n; i++)
for(i = 0; i < n; i++){
def = &table_ident[i]->sym_define;
tcc_free(def->data);
tcc_free(table_ident[i]);
}
tcc_free(table_ident);
/* free sym_pools */