Free attributes before return NULL (#899)
This commit is contained in:
parent
2d3ed43f4e
commit
8f0e7aa22a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue