[SHELL32_APITEST] Fix PIDL leaks.
authorThomas Faber <thomas.faber@reactos.org>
Tue, 10 Sep 2019 10:12:02 +0000 (12:12 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 22 Sep 2019 09:42:10 +0000 (11:42 +0200)
modules/rostests/apitests/shell32/CFSFolder.cpp
modules/rostests/apitests/shell32/CMyComputer.cpp
modules/rostests/apitests/shell32/CShellDesktop.cpp

index b4be49f..ef92e08 100644 (file)
@@ -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);
index 0d77ea2..0254d8e 100644 (file)
@@ -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
index 885e225..329ee8f 100644 (file)
@@ -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);