Module: wine Branch: master Commit: 38a995021ac0898b0977591e80da3705356968dd URL: http://source.winehq.org/git/wine.git/?a=commit;h=38a995021ac0898b0977591e80...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sat Jan 15 21:29:08 2011 +0300
shell32/tests: Fix some leaks in tests (Valgrind).
---
dlls/shell32/tests/shfldr_special.c | 3 +++ dlls/shell32/tests/shlfolder.c | 1 + dlls/shell32/tests/shlview.c | 1 + 3 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/shell32/tests/shfldr_special.c b/dlls/shell32/tests/shfldr_special.c index 24374bc..2374d7c 100644 --- a/dlls/shell32/tests/shfldr_special.c +++ b/dlls/shell32/tests/shfldr_special.c @@ -162,8 +162,11 @@ if (0) hr = IShellFolder2_GetDefaultColumnState(folder, 6, &state); ok(broken(hr == E_NOTIMPL) || hr == E_INVALIDARG /* Win7 */, "got 0x%08x\n", hr);
+ details.str.u.pOleStr = NULL; hr = IShellFolder2_GetDetailsOf(folder, NULL, 0, &details); ok(hr == S_OK || broken(E_NOTIMPL) /* W2K */, "got 0x%08x\n", hr); + if (SHELL_OsIsUnicode()) SHFree(details.str.u.pOleStr); + /* test every column if method is implemented */ if (hr == S_OK) { diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 990ec0c..8701b4d 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -3977,6 +3977,7 @@ static void r_verify_pidl(unsigned l, LPCITEMIDLIST pidl, const WCHAR *path) ok_(__FILE__,l)(lstrcmpW(path, U(filename).pOleStr) == 0, "didn't get expected path (%s), instead: %s\n", wine_dbgstr_w(path), wine_dbgstr_w(U(filename).pOleStr)); + SHFree(U(filename).pOleStr); }else if(filename.uType == STRRET_CSTR){ ok_(__FILE__,l)(strcmp_wa(path, U(filename).cStr) == 0, "didn't get expected path (%s), instead: %s\n", diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c index 101cdf3..9d2fb47 100644 --- a/dlls/shell32/tests/shlview.c +++ b/dlls/shell32/tests/shlview.c @@ -1105,6 +1105,7 @@ static void test_GetSetCurrentViewMode(void) skip("No IFolderView for the desktop folder.\n"); }
+ IShellBrowser_Release(browser); IShellView_DestroyViewWindow(sview); IShellView_Release(sview); IShellFolder_Release(desktop);