summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-07 19:43:59 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-10-07 19:43:59 (GMT)
commit55af4ba26fe16e2a875b96f2025f2bc2227cc111 (patch)
treea1e95062a62133d196c146ae6c8d7164c9d62a31
parente00089388c5706e6bdebcac123ad40862a0b38ef (diff)
parentad3d5c59b3c57112e3b96812ee8a66b08dcd864e (diff)
downloadCMake-55af4ba26fe16e2a875b96f2025f2bc2227cc111.zip
CMake-55af4ba26fe16e2a875b96f2025f2bc2227cc111.tar.gz
CMake-55af4ba26fe16e2a875b96f2025f2bc2227cc111.tar.bz2
Merge topic 'cmListFileLexer-fix-leak-on-error'
ad3d5c5 cmListFileLexer: Fix leak on error before EOF
-rw-r--r--Source/cmListFileLexer.c1
-rw-r--r--Source/cmListFileLexer.in.l1
2 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c
index 2841fe5..f127add 100644
--- a/Source/cmListFileLexer.c
+++ b/Source/cmListFileLexer.c
@@ -2271,6 +2271,7 @@ static void cmListFileLexerInit(cmListFileLexer* lexer)
/*--------------------------------------------------------------------------*/
static void cmListFileLexerDestroy(cmListFileLexer* lexer)
{
+ cmListFileLexerSetToken(lexer, 0, 0);
if(lexer->file || lexer->string_buffer)
{
cmListFileLexer_yylex_destroy(lexer->scanner);
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index 12b53ee..bd3c1eb 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -292,6 +292,7 @@ static void cmListFileLexerInit(cmListFileLexer* lexer)
/*--------------------------------------------------------------------------*/
static void cmListFileLexerDestroy(cmListFileLexer* lexer)
{
+ cmListFileLexerSetToken(lexer, 0, 0);
if(lexer->file || lexer->string_buffer)
{
cmListFileLexer_yylex_destroy(lexer->scanner);