From 380eacd0f4037ec00f37ad5b5e4baa18301cf3dd Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 25 Oct 2008 22:44:53 +0000 Subject: small cosmetic fixes --- src/core/token.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core/token.c') 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; } -- cgit v1.2.3