diff --git a/src/lexer.c b/src/lexer.c index 49b74f5..16a8fef 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -3469,6 +3469,10 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) return node; /* the COMMENT token */ } + /* check attributes before return NULL */ + if (attributes) + TY_(FreeAttribute)( doc, attributes ); + DEBUG_LOG(SPRTF("Returning NULL...\n")); return NULL; }