Module: wine Branch: master Commit: 0f5d6827db681b8ff23b8d60c3b040b3c26ece75 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f5d6827db681b8ff23b8d60c3...
Author: Michael Stefaniuc mstefani@redhat.de Date: Fri Aug 1 21:50:51 2008 +0200
msxml3: Remove redundant NULL checks before HeapFree and fix a memleak (Smatch).
---
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; }