From 4f1c1a686d4042e62822ef6ce70e4723ca62a02a Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Tue, 14 Sep 2021 11:18:50 -0700 Subject: [PATCH] msxml3/tests: Avoid double-free using BSTR helper. Signed-off-by: Daniel Lehman --- random crash on Windows caused by double-free of BSTR direct call to SysFreeString frees BSTR allocated and managed by _bstr_/free_bstrs helpers. later call to free_bstrs in test_domdoc leads to crash some VariantClear calls may need the same treatment but this fixes a specific crash --- dlls/msxml3/tests/domdoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index a0bcca2d4e95..9e9789ebd9a8 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -13644,11 +13644,11 @@ todo_wine ok(hr == S_OK, "got %#x\n", hr); ok(b == VARIANT_TRUE, "got %d\n", b); ok(qi_count == 0, "got %d QI calls\n", qi_count); - SysFreeString(V_BSTR(&var)); IXMLDOMDocument2_Release(doc); DeleteFileA(path); + free_bstrs(); } START_TEST(domdoc) -- 2.27.0