mirror of https://github.com/FreeRDP/FreeRDP
remove useless NULL pointer check before free
This commit is contained in:
parent
61b24bf0b3
commit
3b52a60d31
|
@ -869,7 +869,6 @@ out_error:
|
|||
MessageQueue_Free(drive->IrpQueue);
|
||||
ListDictionary_Free(drive->files);
|
||||
drive_free(drive);
|
||||
free(drive);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,23 +100,14 @@ static void rail_client_clean_exec_order(RAIL_EXEC_ORDER* exec)
|
|||
if (!exec)
|
||||
return;
|
||||
|
||||
if (exec->exeOrFile.string)
|
||||
{
|
||||
free(exec->exeOrFile.string);
|
||||
exec->exeOrFile.string = NULL;
|
||||
}
|
||||
|
||||
if (exec->workingDir.string)
|
||||
{
|
||||
free(exec->workingDir.string);
|
||||
exec->workingDir.string = NULL;
|
||||
}
|
||||
|
||||
if (exec->arguments.string)
|
||||
{
|
||||
free(exec->arguments.string);
|
||||
exec->arguments.string = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2046,23 +2046,14 @@ static void update_free_window_state(WINDOW_STATE_ORDER* window_state)
|
|||
if (!window_state)
|
||||
return;
|
||||
|
||||
if (window_state->titleInfo.string)
|
||||
{
|
||||
free(window_state->titleInfo.string);
|
||||
window_state->titleInfo.string = NULL;
|
||||
}
|
||||
|
||||
if (window_state->windowRects)
|
||||
{
|
||||
free(window_state->windowRects);
|
||||
window_state->windowRects = NULL;
|
||||
}
|
||||
|
||||
if (window_state->visibilityRects)
|
||||
{
|
||||
free(window_state->visibilityRects);
|
||||
window_state->visibilityRects = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
rdpUpdate* update_new(rdpRdp* rdp)
|
||||
|
|
|
@ -600,23 +600,17 @@ BOOL update_recv_desktop_info_order(rdpUpdate* update, wStream* s, WINDOW_ORDER_
|
|||
|
||||
void update_free_window_icon_info(ICON_INFO* iconInfo)
|
||||
{
|
||||
if (iconInfo->bitsColor)
|
||||
{
|
||||
if (!iconInfo)
|
||||
return;
|
||||
|
||||
free(iconInfo->bitsColor);
|
||||
iconInfo->bitsColor = NULL;
|
||||
}
|
||||
|
||||
if (iconInfo->bitsMask)
|
||||
{
|
||||
free(iconInfo->bitsMask);
|
||||
iconInfo->bitsMask = NULL;
|
||||
}
|
||||
|
||||
if (iconInfo->colorTable)
|
||||
{
|
||||
free(iconInfo->colorTable);
|
||||
iconInfo->colorTable = NULL;
|
||||
}
|
||||
|
||||
free(iconInfo);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue