Merge topic 'cmListFileLexer-fix-leak-on-error'
ad3d5c5
cmListFileLexer: Fix leak on error before EOF
This commit is contained in:
commit
55af4ba26f
|
@ -2271,6 +2271,7 @@ static void cmListFileLexerInit(cmListFileLexer* lexer)
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
static void cmListFileLexerDestroy(cmListFileLexer* lexer)
|
static void cmListFileLexerDestroy(cmListFileLexer* lexer)
|
||||||
{
|
{
|
||||||
|
cmListFileLexerSetToken(lexer, 0, 0);
|
||||||
if(lexer->file || lexer->string_buffer)
|
if(lexer->file || lexer->string_buffer)
|
||||||
{
|
{
|
||||||
cmListFileLexer_yylex_destroy(lexer->scanner);
|
cmListFileLexer_yylex_destroy(lexer->scanner);
|
||||||
|
|
|
@ -292,6 +292,7 @@ static void cmListFileLexerInit(cmListFileLexer* lexer)
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
static void cmListFileLexerDestroy(cmListFileLexer* lexer)
|
static void cmListFileLexerDestroy(cmListFileLexer* lexer)
|
||||||
{
|
{
|
||||||
|
cmListFileLexerSetToken(lexer, 0, 0);
|
||||||
if(lexer->file || lexer->string_buffer)
|
if(lexer->file || lexer->string_buffer)
|
||||||
{
|
{
|
||||||
cmListFileLexer_yylex_destroy(lexer->scanner);
|
cmListFileLexer_yylex_destroy(lexer->scanner);
|
||||||
|
|
Loading…
Reference in New Issue