Nikolay Sivov : shell32/tests: Fix couple PIDL leaks in tests.

Alexandre Julliard julliard at winehq.org
Mon Jan 24 11:07:30 CST 2011


Module: wine
Branch: master
Commit: 7ee7f0843bd1760bdc3df9312ccf26efa49b4cc4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7ee7f0843bd1760bdc3df9312ccf26efa49b4cc4

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sat Jan 22 03:43:59 2011 +0300

shell32/tests: Fix couple PIDL leaks in tests.

---

 dlls/shell32/tests/shlfolder.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index f2a1424..ea675b9 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -2784,9 +2784,10 @@ static void test_ShellItemCompare(void)
     hr = IShellFolder_BindToObject(psf_desktop, pidl_cwd, NULL, &IID_IShellFolder, (void**)&psf_current);
     ok(SUCCEEDED(hr), "BindToObject returned %x\n", hr);
     IShellFolder_Release(psf_desktop);
+    ILFree(pidl_cwd);
 
     /* Generate ShellItems for the files */
-    ZeroMemory(&psi, sizeof(IShellItem*)*9);
+    memset(&psi, 0, sizeof(psi));
     failed = FALSE;
     for(i = 0; i < 9; i++)
     {
@@ -4443,6 +4444,7 @@ static void test_SHChangeNotify(void)
     SHChangeNotifyDeregister(notifyID);
     DestroyWindow(wnd);
 
+    ILFree((LPITEMIDLIST)entries[0].pidl);
     br = RemoveDirectoryA(root_dirA);
     ok(br == TRUE, "RemoveDirectory failed: %d\n", GetLastError());
 }




More information about the wine-cvs mailing list