Merge pull request #884 from ltx2018/next
fix memleak in GetTokenFromStream
This commit is contained in:
commit
ddbcd2abd0
16
src/lexer.c
16
src/lexer.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue