Rob Shearman : msxml3: Don' t leak node in xmldoc_createElement in the wrong type was specified.

Alexandre Julliard julliard at winehq.org
Thu Nov 15 07:45:02 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Wed Nov 14 10:49:34 2007 +0000

msxml3: Don't leak node in xmldoc_createElement in the wrong type was specified.

---

 dlls/msxml3/xmldoc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c
index e387921..6d44c78 100644
--- a/dlls/msxml3/xmldoc.c
+++ b/dlls/msxml3/xmldoc.c
@@ -449,11 +449,10 @@ static HRESULT WINAPI xmldoc_createElement(IXMLDocument *iface, VARIANT vType,
 
     *ppElem = NULL;
 
-    node = xmlNewNode(NULL, empty);
-
     if (V_VT(&vType) != VT_I4)
         return E_INVALIDARG;
 
+    node = xmlNewNode(NULL, empty);
     node->type = type_msxml_to_libxml(V_I4(&vType));
 
     /* FIXME: create xmlNodePtr based on vType and var1 */




More information about the wine-cvs mailing list