diff options
| author | Paul Buetow <paul@buetow.org> | 2008-10-25 22:44:53 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-10-25 22:44:53 +0000 |
| commit | 380eacd0f4037ec00f37ad5b5e4baa18301cf3dd (patch) | |
| tree | 524ad303295c77d168d2106876b5965595fb264a /src/core/token.c | |
| parent | 4aeb6d5394e7c65b8c43b71908d85ef8cfe41c3a (diff) | |
small cosmetic fixes
Diffstat (limited to 'src/core/token.c')
| -rw-r--r-- | src/core/token.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/token.c b/src/core/token.c index f7955fc..71d9551 100644 --- a/src/core/token.c +++ b/src/core/token.c @@ -300,14 +300,11 @@ token_new_copy(Token *p_token) { void token_copy_vals(Token *p_token_to, Token *p_token_from) { int i_len; - // TODO: Check against mem leak - // if (p_token_to->c_val) - // free(p_token_to->c_val); - if (p_token_from->c_val) { i_len = strlen(p_token_from->c_val); p_token_to->c_val = calloc(i_len+1, sizeof(char)); strcpy(p_token_to->c_val, p_token_from->c_val); + } else { p_token_to->c_val = NULL; } |
