shell32/tests: Fix couple PIDL leaks in tests.

This commit is contained in:
Nikolay Sivov 2011-01-22 03:43:59 +03:00 committed by Alexandre Julliard
parent b907b7d6bf
commit 7ee7f0843b
1 changed files with 3 additions and 1 deletions

View File

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