Unified · Split
| @@ -888,6 +888,7 @@ static void tcc_cleanup(void) · 887 unmodified lines | ||
| 888 | 888 | for(i = 0; i < n; i++) |
| 889 | 889 | tcc_free(table_ident[i]); |
| 890 | 890 | tcc_free(table_ident); |
| 891 | + table_ident = NULL; | |
| 891 | 892 | |
| 892 | 893 | /* free sym_pools */ |
| 893 | 894 | dynarray_reset(&sym_pools, &nb_sym_pools); |
| @@ -3165,7 +3165,10 @@ ST_FUNC void preprocess_new(void) · 3164 unmodified lines | ||
| 3165 | 3165 | isidnum_table[i-CH_EOF] = isid(i) || isnum(i); |
| 3166 | 3166 | |
| 3167 | 3167 | /* add all tokens */ |
| 3168 | − table_ident = NULL; | |
| 3168 | + if (table_ident) { | |
| 3169 | + tcc_free (table_ident); | |
| 3170 | + table_ident = NULL; | |
| 3171 | + } | |
| 3169 | 3172 | memset(hash_ident, 0, TOK_HASH_SIZE * sizeof(TokenSym *)); |
| 3170 | 3173 | |
| 3171 | 3174 | tok_ident = TOK_IDENT; |