[PATCH] vbscript/tests: Add missing checks for Close() calls (Coverity).
Nikolay Sivov
nsivov at codeweavers.com
Fri Jan 3 07:09:10 CST 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/vbscript/tests/run.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c
index 5357ab1f12..d45416a94a 100644
--- a/dlls/vbscript/tests/run.c
+++ b/dlls/vbscript/tests/run.c
@@ -1956,7 +1956,6 @@ static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim)
IActiveScriptParse *parser;
IActiveScript *engine;
IDispatch *script_disp;
- LONG ref;
HRESULT hres;
engine = create_and_init_script(flags, TRUE);
@@ -1980,13 +1979,10 @@ static HRESULT parse_script(DWORD flags, BSTR script_str, const WCHAR *delim)
hres = IActiveScriptParse_ParseScriptText(parser, script_str, NULL, NULL, delim, 0, 0, 0, NULL, NULL);
- IActiveScript_Close(engine);
-
IDispatch_Release(script_disp);
- IActiveScript_Release(engine);
+ IActiveScriptParse_Release(parser);
+ close_script(engine);
- ref = IActiveScriptParse_Release(parser);
- ok(!ref, "ref=%d\n", ref);
return hres;
}
@@ -2383,7 +2379,8 @@ static void test_gc(void)
SET_EXPECT(global_success_d);
SET_EXPECT(global_success_i);
- IActiveScript_Close(engine);
+ hres = IActiveScript_Close(engine);
+ ok(hres == S_OK, "Close failed: %08x\n", hres);
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
--
2.24.1
More information about the wine-devel
mailing list