[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4218-gcfacea8
Brad King
brad.king at kitware.com
Tue Sep 17 10:32:18 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via cfacea8b7c3b7f8f2bbe3e999ed57793d9b902d9 (commit)
via ad3d5c59b3c57112e3b96812ee8a66b08dcd864e (commit)
from fa12c9b0385c2035e40f0132eae6c3788a8774a3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfacea8b7c3b7f8f2bbe3e999ed57793d9b902d9
commit cfacea8b7c3b7f8f2bbe3e999ed57793d9b902d9
Merge: fa12c9b ad3d5c5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 17 10:32:16 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 17 10:32:16 2013 -0400
Merge topic 'cmListFileLexer-fix-leak-on-error' into next
ad3d5c5 cmListFileLexer: Fix leak on error before EOF
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad3d5c59b3c57112e3b96812ee8a66b08dcd864e
commit ad3d5c59b3c57112e3b96812ee8a66b08dcd864e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 17 10:24:17 2013 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 17 10:27:08 2013 -0400
cmListFileLexer: Fix leak on error before EOF
Teach cmListFileLexerDestroy to call cmListFileLexerSetToken with a NULL
token to free the token string buffer. Without this, if an error occurs
before the token cleanup happens when EOF is reached, then the token
string buffer may leak.
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);
-----------------------------------------------------------------------
Summary of changes:
Source/cmListFileLexer.c | 1 +
Source/cmListFileLexer.in.l | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list