summaryrefslogtreecommitdiffstats
path: root/Source/LexerParser/cmFortranParser.y
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-07 23:48:42 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-08 13:13:50 (GMT)
commitfda060f030f57c52028d38985edc95a74d0243a5 (patch)
tree245c3baabb28f178c601858077352c864fb992be /Source/LexerParser/cmFortranParser.y
parentacb25d50d9d37e93cafcbbc4401e1b45029b6461 (diff)
downloadCMake-fda060f030f57c52028d38985edc95a74d0243a5.zip
CMake-fda060f030f57c52028d38985edc95a74d0243a5.tar.gz
CMake-fda060f030f57c52028d38985edc95a74d0243a5.tar.bz2
LexerParser: Do not leak Fortran parser tokens discarded due to errors
Diffstat (limited to 'Source/LexerParser/cmFortranParser.y')
-rw-r--r--Source/LexerParser/cmFortranParser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/LexerParser/cmFortranParser.y b/Source/LexerParser/cmFortranParser.y
index e461160..a3e1c24 100644
--- a/Source/LexerParser/cmFortranParser.y
+++ b/Source/LexerParser/cmFortranParser.y
@@ -92,6 +92,8 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
%token SUBMODULE
%token USE
+%destructor { free($$); } WORD STRING CPP_INCLUDE_ANGLE
+
/*-------------------------------------------------------------------------*/
/* grammar */
%%