remove redundant NULL pointer check

This commit is contained in:
weizhenwei 2017-06-23 09:44:40 +08:00
parent bd94dcc6d5
commit 5d8d3b53c5
2 changed files with 2 additions and 11 deletions

View File

@ -2156,11 +2156,7 @@ void update_free(rdpUpdate* update)
free(update->altsec);
free(update->window->monitored_desktop.windowIds);
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->window->window_icon.iconInfo = NULL;
}
update_free_window_icon_info(update->window->window_icon.iconInfo);
free(update->window);
MessageQueue_Free(update->queue);
free(update);

View File

@ -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)
{
if (window_icon->iconInfo)
{
update_free_window_icon_info(window_icon->iconInfo);
window_icon->iconInfo = NULL;
}
update_free_window_icon_info(window_icon->iconInfo);
window_icon->iconInfo = (ICON_INFO*) calloc(1, sizeof(ICON_INFO));
if (!window_icon->iconInfo)
return FALSE;