From afe0ba175cc0507290a82cd97da5e0a141932533 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 8 Jul 2016 10:10:33 +0200 Subject: [PATCH] shell32/tests: Remove redundant NULL checks before CoTaskMemFree(). Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/shell32/tests/brsfolder.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/shell32/tests/brsfolder.c b/dlls/shell32/tests/brsfolder.c index 0ef5bb15fe4..bf29d1169f2 100644 --- a/dlls/shell32/tests/brsfolder.c +++ b/dlls/shell32/tests/brsfolder.c @@ -248,10 +248,8 @@ static void test_click_make_new_folder_button(void) shfileop.fFlags = FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT; SHFileOperationA(&shfileop); - if (pidl) - CoTaskMemFree(pidl); - if (test_folder_pidl) - CoTaskMemFree(test_folder_pidl); + CoTaskMemFree(pidl); + CoTaskMemFree(test_folder_pidl); test_folder_object->lpVtbl->Release(test_folder_object); CoUninitialize(); @@ -346,16 +344,12 @@ static void test_selection(void) /* test without flags */ bi.ulFlags = 0; pidl = SHBrowseForFolderA(&bi); - - if (pidl) - CoTaskMemFree(pidl); + CoTaskMemFree(pidl); /* test with flag */ bi.ulFlags = BIF_NEWDIALOGSTYLE; pidl = SHBrowseForFolderA(&bi); - - if (pidl) - CoTaskMemFree(pidl); + CoTaskMemFree(pidl); IShellFolder_Release(desktop_object);