Merge pull request #884 from ltx2018/next

fix memleak in GetTokenFromStream
This commit is contained in:
Geoff McLane 2020-10-02 18:07:33 +02:00 committed by GitHub
commit ddbcd2abd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3270,6 +3270,22 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
if (!name) if (!name)
{ {
/* check if attributes are created by ASP markup */
if (asp)
{
av = TY_(NewAttribute)(doc);
av->asp = asp;
AddAttrToList( &attributes, av );
}
/* check if attributes are created by PHP markup */
if (php)
{
av = TY_(NewAttribute)(doc);
av->php = php;
AddAttrToList( &attributes, av );
}
/* fix for http://tidy.sf.net/bug/788031 */ /* fix for http://tidy.sf.net/bug/788031 */
lexer->lexsize -= 1; lexer->lexsize -= 1;
lexer->txtend = lexer->txtstart; lexer->txtend = lexer->txtstart;