msxml3: Remove redundant NULL checks before HeapFree and fix a memleak (Smatch).
Michael Stefaniuc
mstefani at redhat.de
Fri Aug 1 14:50:51 CDT 2008
---
Previous patch conflicted.
dlls/msxml3/saxreader.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c
index 0b44a6e..4bba5e6 100644
--- a/dlls/msxml3/saxreader.c
+++ b/dlls/msxml3/saxreader.c
@@ -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;
}
--
1.6.0.rc1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080801/0466d8f7/attachment.pgp
More information about the wine-patches
mailing list