Commit afe0ba17 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32/tests: Remove redundant NULL checks before CoTaskMemFree().

parent b5a7853b
...@@ -248,10 +248,8 @@ static void test_click_make_new_folder_button(void) ...@@ -248,10 +248,8 @@ static void test_click_make_new_folder_button(void)
shfileop.fFlags = FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT; shfileop.fFlags = FOF_NOCONFIRMATION|FOF_NOERRORUI|FOF_SILENT;
SHFileOperationA(&shfileop); SHFileOperationA(&shfileop);
if (pidl) CoTaskMemFree(pidl);
CoTaskMemFree(pidl); CoTaskMemFree(test_folder_pidl);
if (test_folder_pidl)
CoTaskMemFree(test_folder_pidl);
test_folder_object->lpVtbl->Release(test_folder_object); test_folder_object->lpVtbl->Release(test_folder_object);
CoUninitialize(); CoUninitialize();
...@@ -346,16 +344,12 @@ static void test_selection(void) ...@@ -346,16 +344,12 @@ static void test_selection(void)
/* test without flags */ /* test without flags */
bi.ulFlags = 0; bi.ulFlags = 0;
pidl = SHBrowseForFolderA(&bi); pidl = SHBrowseForFolderA(&bi);
CoTaskMemFree(pidl);
if (pidl)
CoTaskMemFree(pidl);
/* test with flag */ /* test with flag */
bi.ulFlags = BIF_NEWDIALOGSTYLE; bi.ulFlags = BIF_NEWDIALOGSTYLE;
pidl = SHBrowseForFolderA(&bi); pidl = SHBrowseForFolderA(&bi);
CoTaskMemFree(pidl);
if (pidl)
CoTaskMemFree(pidl);
IShellFolder_Release(desktop_object); IShellFolder_Release(desktop_object);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment