From 0f5d6827db681b8ff23b8d60c3b040b3c26ece75 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 1 Aug 2008 21:50:51 +0200 Subject: [PATCH] msxml3: Remove redundant NULL checks before HeapFree and fix a memleak (Smatch). --- dlls/msxml3/saxreader.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/dlls/msxml3/saxreader.c b/dlls/msxml3/saxreader.c index 0b44a6eb6d9..4bba5e649f2 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; } -- 2.11.4.GIT