History

tcc_free(table_ident) in preprocess_new() if table_ident != NULL

seyko committed 11 years ago

Commit a429d401 parent e2a8fd42 files · +5 −1Browse files

Unified · Split

2 files
  1. libtcc.c +1 −0
  2. tccpp.c +4 −1
libtcc.c+1−0
@@ -888,6 +888,7 @@ static void tcc_cleanup(void) · 887 unmodified lines
888888 for(i = 0; i < n; i++)
889889 tcc_free(table_ident[i]);
890890 tcc_free(table_ident);
891+ table_ident = NULL;
891892
892893 /* free sym_pools */
893894 dynarray_reset(&sym_pools, &nb_sym_pools);
tccpp.c+4−1
@@ -3165,7 +3165,10 @@ ST_FUNC void preprocess_new(void) · 3164 unmodified lines
31653165 isidnum_table[i-CH_EOF] = isid(i) || isnum(i);
31663166
31673167 /* add all tokens */
3168− table_ident = NULL;
3168+ if (table_ident) {
3169+ tcc_free (table_ident);
3170+ table_ident = NULL;
3171+ }
31693172 memset(hash_ident, 0, TOK_HASH_SIZE * sizeof(TokenSym *));
31703173
31713174 tok_ident = TOK_IDENT;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t