Commit 0f5d6827 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

parent 5d4d5b16
...@@ -806,16 +806,12 @@ static HRESULT SAXAttributes_create(saxattributes **attr, ...@@ -806,16 +806,12 @@ static HRESULT SAXAttributes_create(saxattributes **attr,
|| !attributes->szURI || !attributes->szValue || !attributes->szURI || !attributes->szValue
|| !attributes->szQName) || !attributes->szQName)
{ {
if(attributes->szLocalname)
HeapFree(GetProcessHeap(), 0, attributes->szLocalname); HeapFree(GetProcessHeap(), 0, attributes->szLocalname);
if(attributes->szPrefix)
HeapFree(GetProcessHeap(), 0, attributes->szPrefix); HeapFree(GetProcessHeap(), 0, attributes->szPrefix);
if(attributes->szURI)
HeapFree(GetProcessHeap(), 0, attributes->szURI); HeapFree(GetProcessHeap(), 0, attributes->szURI);
if(attributes->szValue)
HeapFree(GetProcessHeap(), 0, attributes->szValue); HeapFree(GetProcessHeap(), 0, attributes->szValue);
if(attributes->szQName)
HeapFree(GetProcessHeap(), 0, attributes->szQName); HeapFree(GetProcessHeap(), 0, attributes->szQName);
HeapFree(GetProcessHeap(), 0, attributes);
return E_FAIL; return E_FAIL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment