Marcus Meissner : msxml3: Fixed if nesting / ptr checking problems in xmlnode_transformNode.

Alexandre Julliard julliard at winehq.org
Fri Oct 31 09:24:10 CDT 2008


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Fri Oct 31 00:19:49 2008 +0100

msxml3: Fixed if nesting / ptr checking problems in xmlnode_transformNode.

---

 dlls/msxml3/node.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 1d99be3..f2c6154 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -1310,12 +1310,8 @@ static HRESULT WINAPI xmlnode_transformNode(
                     if(pOutput)
                     {
                         htmlDocContentDumpOutput(pOutput, result->doc, NULL);
-                        if(pOutput)
-                        {
-                            pContent = xmlBufferContent(pOutput->buffer);
-                            *xmlString = bstr_from_xmlChar(pContent);
-                        }
-
+                        pContent = xmlBufferContent(pOutput->buffer);
+                        *xmlString = bstr_from_xmlChar(pContent);
                         xmlOutputBufferClose(pOutput);
                     }
                 }
@@ -1332,13 +1328,12 @@ static HRESULT WINAPI xmlnode_transformNode(
                         {
                             pContent = xmlBufferContent(pXmlBuf);
                             *xmlString = bstr_from_xmlChar(pContent);
-
-                            xmlBufferFree(pXmlBuf);
                         }
+                        xmlBufferFree(pXmlBuf);
                     }
                 }
+                xmlFreeDoc(result);
             }
-            xmlFreeDoc(result);
             /* libxslt "helpfully" frees the XML document the stylesheet was
                generated from, too */
             xsltSS->doc = NULL;




More information about the wine-cvs mailing list