From 306129c92e6c814b575a2cc713548ec96bec2f1b Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Wed, 14 Nov 2007 10:49:34 +0000 Subject: [PATCH] msxml3: Don't leak node in xmldoc_createElement in the wrong type was specified. --- dlls/msxml3/xmldoc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c index e387921c55a..6d44c785580 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 */