Michael Karcher : msxml3: Fix memory leaks in node.c.

Alexandre Julliard julliard at winehq.org
Mon Oct 13 06:39:01 CDT 2008


Module: wine
Branch: master
Commit: 19d635f9a3f5f3ef71d8ca370e0c8f9b1d505438
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=19d635f9a3f5f3ef71d8ca370e0c8f9b1d505438

Author: Michael Karcher <wine at mkarcher.dialup.fu-berlin.de>
Date:   Sat Oct 11 23:58:59 2008 +0200

msxml3: Fix memory leaks in node.c.

---

 dlls/msxml3/node.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index cecabe8..94df283 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -1303,8 +1303,13 @@ static HRESULT WINAPI xmlnode_transformNode(
                     }
                 }
             }
+            xmlFreeDoc(result);
         }
 
+        /* libxslt "helpfully" frees the XML document the stylesheet was
+           generated from, too */
+        xsltSS->doc = NULL;
+        xsltFreeStylesheet(xsltSS);
         IXMLDOMNode_Release(ssNew);
     }
 
@@ -1379,6 +1384,7 @@ static HRESULT WINAPI xmlnode_get_namespaceURI(
     {
         *namespaceURI = bstr_from_xmlChar( pNSList[0]->href );
 
+        xmlFree( pNSList );
         hr = S_OK;
     }
 
@@ -1405,6 +1411,7 @@ static HRESULT WINAPI xmlnode_get_prefix(
     {
         *prefixString = bstr_from_xmlChar( pNSList[0]->prefix );
 
+        xmlFree(pNSList);
         hr = S_OK;
     }
 




More information about the wine-cvs mailing list