https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cf2b918e0f5dc4ed745a3…
commit cf2b918e0f5dc4ed745a36158f2f003972d591be
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Tue Sep 10 12:12:02 2019 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Sep 22 11:42:10 2019 +0200
[SHELL32_APITEST] Fix PIDL leaks.
---
modules/rostests/apitests/shell32/CFSFolder.cpp | 2 +-
modules/rostests/apitests/shell32/CMyComputer.cpp | 2 +-
modules/rostests/apitests/shell32/CShellDesktop.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/rostests/apitests/shell32/CFSFolder.cpp
b/modules/rostests/apitests/shell32/CFSFolder.cpp
index b4be49fcc1c..ef92e081343 100644
--- a/modules/rostests/apitests/shell32/CFSFolder.cpp
+++ b/modules/rostests/apitests/shell32/CFSFolder.cpp
@@ -76,7 +76,7 @@ VOID TestUninitialized()
hr = ppf2->Initialize(testpidl);
ok(hr == S_OK, "hr = %lx\n", hr);
- LPITEMIDLIST pidl;
+ CComHeapPtr<ITEMIDLIST> pidl;
hr = ppf2->GetCurFolder(&pidl);
ok(hr == S_OK, "hr = %lx\n", hr);
ok(pidl->mkid.cb == 2 * sizeof(WORD), "got wrong pidl size, cb = %x\n",
pidl->mkid.cb);
diff --git a/modules/rostests/apitests/shell32/CMyComputer.cpp
b/modules/rostests/apitests/shell32/CMyComputer.cpp
index 0d77ea23afb..0254d8e14e2 100644
--- a/modules/rostests/apitests/shell32/CMyComputer.cpp
+++ b/modules/rostests/apitests/shell32/CMyComputer.cpp
@@ -65,7 +65,7 @@ VOID TestInitialize(_In_ IShellFolder2 *psf2)
//hr = ppf2->GetCurFolder(NULL);
//ok(hr == E_INVALIDARG, "hr = %lx\n", hr);
- LPITEMIDLIST pidl;
+ CComHeapPtr<ITEMIDLIST> pidl;
hr = ppf2->GetCurFolder(&pidl);
ok(hr == S_OK, "hr = %lx\n", hr);
// 0 in win10, 14 in xp
diff --git a/modules/rostests/apitests/shell32/CShellDesktop.cpp
b/modules/rostests/apitests/shell32/CShellDesktop.cpp
index 885e2251639..329ee8f8f2d 100644
--- a/modules/rostests/apitests/shell32/CShellDesktop.cpp
+++ b/modules/rostests/apitests/shell32/CShellDesktop.cpp
@@ -205,7 +205,7 @@ VOID TestInitialize(_In_ IShellFolder *psf)
//hr = ppf2->GetCurFolder(NULL);
//ok(hr == E_INVALIDARG, "hr = %lx\n", hr);
- LPITEMIDLIST pidl;
+ CComHeapPtr<ITEMIDLIST> pidl;
hr = ppf2->GetCurFolder(&pidl);
ok(hr == S_OK, "hr = %lx\n", hr);
ok(pidl->mkid.cb == 0, "expected empty pidl got cb = %x\n",
pidl->mkid.cb);