mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-28 12:24:41 +08:00
fix memroy leak of window_icon->iconInfo at update_read_window_icon_order()
This commit is contained in:
parent
c39aecbdb4
commit
d77802d5e9
@ -2143,6 +2143,13 @@ void update_free(rdpUpdate* update)
|
||||
free(update->window->window_state.titleInfo.string);
|
||||
free(update->window->window_state.windowRects);
|
||||
free(update->window->window_state.visibilityRects);
|
||||
if (update->window->window_icon.iconInfo)
|
||||
{
|
||||
free(update->window->window_icon.iconInfo->bitsColor);
|
||||
free(update->window->window_icon.iconInfo->bitsMask);
|
||||
free(update->window->window_icon.iconInfo->colorTable);
|
||||
free(update->window->window_icon.iconInfo);
|
||||
}
|
||||
free(update->window);
|
||||
MessageQueue_Free(update->queue);
|
||||
free(update);
|
||||
|
@ -352,6 +352,14 @@ 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)
|
||||
{
|
||||
free(window_icon->iconInfo->bitsColor);
|
||||
free(window_icon->iconInfo->bitsMask);
|
||||
free(window_icon->iconInfo->colorTable);
|
||||
free(window_icon->iconInfo);
|
||||
}
|
||||
|
||||
window_icon->iconInfo = (ICON_INFO*) calloc(1, sizeof(ICON_INFO));
|
||||
if (!window_icon->iconInfo)
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user