From 0a2653437733b90c48009928dc7ff87e5da998d8 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Tue, 15 Feb 2022 11:59:31 -0800 Subject: [PATCH] msxml3/tests: Fix some double-frees of BSTRs. Signed-off-by: Daniel Lehman --- VariantClear frees bstr allocated by _bstr_() helper which is then freed again later by free_bstrs() can alternatively replace _bstr_ with SysAllocString if preferred --- dlls/msxml3/tests/domdoc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index ad4d255abe7..f7929cd3a23 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -5281,7 +5281,6 @@ static void test_cloneNode(void ) V_VT(&v) = VT_BSTR; hr = IXMLDOMDocument2_setProperty(doc, _bstr_("SelectionLanguage"), v); ok(hr == S_OK, "got 0x%08x\n", hr); - VariantClear(&v); /* clone document node */ hr = IXMLDOMDocument2_cloneNode(doc, VARIANT_TRUE, &node); @@ -8847,7 +8846,6 @@ static void test_put_nodeTypedValue(void) V_BSTR(&value) = _bstr_("1"); hr = IXMLDOMElement_put_nodeTypedValue(elem, value); EXPECT_HR(hr, S_OK); - VariantClear(&value); V_VT(&value) = VT_EMPTY; hr = IXMLDOMElement_get_nodeTypedValue(elem, &value); -- 2.34.1