diff options
author | Brad King <brad.king@kitware.com> | 2013-10-07 19:43:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-07 19:43:59 (GMT) |
commit | 55af4ba26fe16e2a875b96f2025f2bc2227cc111 (patch) | |
tree | a1e95062a62133d196c146ae6c8d7164c9d62a31 | |
parent | e00089388c5706e6bdebcac123ad40862a0b38ef (diff) | |
parent | ad3d5c59b3c57112e3b96812ee8a66b08dcd864e (diff) | |
download | CMake-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.c | 1 | ||||
-rw-r--r-- | Source/cmListFileLexer.in.l | 1 |
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); |