msxml3: Remove redundant NULL checks before HeapFree and fix a memleak (Smatch).

This commit is contained in:
Michael Stefaniuc 2008-08-01 21:50:51 +02:00 committed by Alexandre Julliard
parent 5d4d5b16fd
commit 0f5d6827db
1 changed files with 6 additions and 10 deletions

View File

@ -806,16 +806,12 @@ static HRESULT SAXAttributes_create(saxattributes **attr,
|| !attributes->szURI || !attributes->szValue
|| !attributes->szQName)
{
if(attributes->szLocalname)
HeapFree(GetProcessHeap(), 0, attributes->szLocalname);
if(attributes->szPrefix)
HeapFree(GetProcessHeap(), 0, attributes->szPrefix);
if(attributes->szURI)
HeapFree(GetProcessHeap(), 0, attributes->szURI);
if(attributes->szValue)
HeapFree(GetProcessHeap(), 0, attributes->szValue);
if(attributes->szQName)
HeapFree(GetProcessHeap(), 0, attributes->szQName);
HeapFree(GetProcessHeap(), 0, attributes->szLocalname);
HeapFree(GetProcessHeap(), 0, attributes->szPrefix);
HeapFree(GetProcessHeap(), 0, attributes->szURI);
HeapFree(GetProcessHeap(), 0, attributes->szValue);
HeapFree(GetProcessHeap(), 0, attributes->szQName);
HeapFree(GetProcessHeap(), 0, attributes);
return E_FAIL;
}