isl_token_free: free string representation of keywords
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 12 Jan 2011 16:27:07 +0000 (17:27 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 12 Jan 2011 16:31:15 +0000 (17:31 +0100)
This should have been part of ab6eaa2 (isl_stream_next_token: keep track
of string representation of keywords, Thu Dec 23 15:32:27 2010 +0100).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_stream.c

index d25ff03..aada120 100644 (file)
@@ -83,7 +83,9 @@ void isl_token_free(struct isl_token *tok)
                return;
        if (tok->type == ISL_TOKEN_VALUE)
                isl_int_clear(tok->u.v);
-       else if (tok->type == ISL_TOKEN_IDENT || tok->type == ISL_TOKEN_STRING)
+       else if (tok->type == ISL_TOKEN_IDENT ||
+                tok->type == ISL_TOKEN_STRING ||
+                tok->is_keyword)
                free(tok->u.s);
        free(tok);
 }