msxml3: Fix memory leaks in node.c.
authorMichael Karcher <wine@mkarcher.dialup.fu-berlin.de>
Sat, 11 Oct 2008 21:58:59 +0000 (23:58 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 13 Oct 2008 09:52:44 +0000 (11:52 +0200)
dlls/msxml3/node.c

index cecabe871ec8f717711170d9dfdd1e060f71b657..94df2836ef637657dbdbef40ce6686c44de20bcf 100644 (file)
@@ -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;
     }