From cf37c6c422222779f4423272edbbd49e25b444c5 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc <mstefani@winehq.org> Date: Tue, 10 Jul 2018 12:36:09 +0200 Subject: [PATCH] comctl32: Remove redundant NULL checks before Free(). Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> --- dlls/comctl32/taskdialog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index ee3b27325fc..463189954e9 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -429,7 +429,7 @@ static HWND taskdialog_create_label(struct taskdialog_info *dialog_info, const W if (syslink) style |= WS_TABSTOP; textW = taskdialog_gettext(dialog_info, TRUE, text); hwnd = CreateWindowW(class, textW, style, 0, 0, 0, 0, dialog_info->hwnd, NULL, 0, NULL); - if (textW) Free(textW); + Free(textW); SendMessageW(hwnd, WM_SETFONT, (WPARAM)font, 0); return hwnd; @@ -825,9 +825,9 @@ static void taskdialog_destroy(struct taskdialog_info *dialog_info) if (dialog_info->taskconfig->dwFlags & TDF_CALLBACK_TIMER) KillTimer(dialog_info->hwnd, ID_TIMER); if (dialog_info->font) DeleteObject(dialog_info->font); if (dialog_info->main_instruction_font) DeleteObject(dialog_info->main_instruction_font); - if (dialog_info->buttons) Free(dialog_info->buttons); - if (dialog_info->radio_buttons) Free(dialog_info->radio_buttons); - if (dialog_info->command_links) Free(dialog_info->command_links); + Free(dialog_info->buttons); + Free(dialog_info->radio_buttons); + Free(dialog_info->command_links); } static INT_PTR CALLBACK taskdialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -- GitLab