Fix mem leak similar to 13641

git-svn-id: svn://10.0.0.236/trunk@47177 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
1999-09-13 21:50:04 +00:00
parent ee58730bc9
commit 18a7c600b5
2 changed files with 6 additions and 4 deletions

View File

@@ -1736,11 +1736,12 @@ void nsXIFDTD::ProcessDocumentInfoTag(const nsIParserNode& aNode)
{
nsString tmpString("XIF_DOC_INFO");
PushNodeAndToken(tmpString);
CAttributeToken* attribute = new CAttributeToken(key,value);
nsIParserNode* top = PeekNode();
if (top != nsnull)
{
CAttributeToken* attribute = new CAttributeToken(key,value);
((nsCParserNode*)top)->AddAttribute(attribute);
}
}
}