From: Michael D. Lowis Date: Thu, 2 Oct 2014 01:06:40 +0000 (-0400) Subject: Set the token to null after freeing X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=dde89cebecb9b31bbbadc973f7456d045b9116b3;p=proto%2Fsclpl.git Set the token to null after freeing --- 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); }