From dde89cebecb9b31bbbadc973f7456d045b9116b3 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Wed, 1 Oct 2014 21:06:40 -0400 Subject: [PATCH] Set the token to null after freeing --- source/sclpl/parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/sclpl/parser.c b/source/sclpl/parser.c index 9317594..57362a8 100644 --- a/source/sclpl/parser.c +++ b/source/sclpl/parser.c @@ -62,8 +62,10 @@ bool parser_eof(parser_t* p_parser) { } void parser_resume(parser_t* p_parser) { - if (NULL != p_parser->p_tok) + if (NULL != p_parser->p_tok) { mem_release(p_parser->p_tok); + p_parser->p_tok = NULL; + } vec_clear(p_parser->p_tok_buf); lexer_skipline(p_parser->p_lexer); } -- 2.52.0