Module: wine Branch: master Commit: c8d6f21284073ba40acc99e013930cb7747a6b9d URL: https://source.winehq.org/git/wine.git/?a=commit;h=c8d6f21284073ba40acc99e01...
Author: Rémi Bernon rbernon@codeweavers.com Date: Sun May 22 17:19:36 2022 +0200
mshtml/tests: Avoid using pointer value after free.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
---
dlls/mshtml/tests/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mshtml/tests/misc.c b/dlls/mshtml/tests/misc.c index 410d24884ee..72692c4915b 100644 --- a/dlls/mshtml/tests/misc.c +++ b/dlls/mshtml/tests/misc.c @@ -240,13 +240,13 @@ static void test_HTMLStorage(void) hres = IHTMLStorage_getItem(storage, key, &var); ok(hres == S_OK, "getItem failed: %08lx\n", hres); ok(V_VT(&var) == VT_NULL, "got %d\n", V_VT(&var)); - SysFreeString(key);
hres = IHTMLStorage_getItem(storage, NULL, NULL); ok(hres == E_POINTER, "getItem returned: %08lx\n", hres);
hres = IHTMLStorage_getItem(storage, key, NULL); ok(hres == E_POINTER, "getItem failed: %08lx\n", hres); + SysFreeString(key);
V_VT(&var) = 0xdead; hres = IHTMLStorage_getItem(storage, NULL, &var);