mirror of https://github.com/FreeRDP/FreeRDP
remove redundant NULL pointer check
This commit is contained in:
parent
bd94dcc6d5
commit
5d8d3b53c5
|
@ -2156,11 +2156,7 @@ void update_free(rdpUpdate* update)
|
||||||
free(update->altsec);
|
free(update->altsec);
|
||||||
free(update->window->monitored_desktop.windowIds);
|
free(update->window->monitored_desktop.windowIds);
|
||||||
update_free_window_state(&update->window->window_state);
|
update_free_window_state(&update->window->window_state);
|
||||||
if (update->window->window_icon.iconInfo)
|
|
||||||
{
|
|
||||||
update_free_window_icon_info(update->window->window_icon.iconInfo);
|
update_free_window_icon_info(update->window->window_icon.iconInfo);
|
||||||
update->window->window_icon.iconInfo = NULL;
|
|
||||||
}
|
|
||||||
free(update->window);
|
free(update->window);
|
||||||
MessageQueue_Free(update->queue);
|
MessageQueue_Free(update->queue);
|
||||||
free(update);
|
free(update);
|
||||||
|
|
|
@ -361,12 +361,7 @@ BOOL update_read_window_state_order(wStream* s, WINDOW_ORDER_INFO* orderInfo, WI
|
||||||
|
|
||||||
BOOL update_read_window_icon_order(wStream* s, WINDOW_ORDER_INFO* orderInfo, WINDOW_ICON_ORDER* window_icon)
|
BOOL update_read_window_icon_order(wStream* s, WINDOW_ORDER_INFO* orderInfo, WINDOW_ICON_ORDER* window_icon)
|
||||||
{
|
{
|
||||||
if (window_icon->iconInfo)
|
|
||||||
{
|
|
||||||
update_free_window_icon_info(window_icon->iconInfo);
|
update_free_window_icon_info(window_icon->iconInfo);
|
||||||
window_icon->iconInfo = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
window_icon->iconInfo = (ICON_INFO*) calloc(1, sizeof(ICON_INFO));
|
window_icon->iconInfo = (ICON_INFO*) calloc(1, sizeof(ICON_INFO));
|
||||||
if (!window_icon->iconInfo)
|
if (!window_icon->iconInfo)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue