mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-12-12 03:06:34 +08:00
fix memory leaks.
This commit is contained in:
parent
b8e16bb1c1
commit
53ccc4c013
@ -336,7 +336,7 @@ boolean xf_pre_connect(freerdp* instance)
|
||||
|
||||
xf_kbd_init(xfi);
|
||||
|
||||
xfi->clrconv = (HCLRCONV) malloc(sizeof(CLRCONV));
|
||||
xfi->clrconv = xnew(CLRCONV);
|
||||
xfi->clrconv->palette = NULL;
|
||||
xfi->clrconv->alpha = 1;
|
||||
xfi->clrconv->invert = 0;
|
||||
@ -568,6 +568,9 @@ void xf_window_free(xfInfo* xfi)
|
||||
cache_free(xfi->cache);
|
||||
xfi->cache = NULL;
|
||||
}
|
||||
|
||||
xfree(xfi->clrconv);
|
||||
rail_free(xfi->rail);
|
||||
}
|
||||
|
||||
void xf_free(xfInfo* xfi)
|
||||
|
@ -108,6 +108,8 @@ void brush_free(rdpBrush* brush)
|
||||
{
|
||||
if (brush != NULL)
|
||||
{
|
||||
xfree(brush->entries);
|
||||
xfree(brush->monoEntries);
|
||||
xfree(brush);
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ void color_table_free(rdpColorTable* color_table)
|
||||
{
|
||||
if (color_table != NULL)
|
||||
{
|
||||
xfree(color_table->entries);
|
||||
xfree(color_table);
|
||||
}
|
||||
}
|
||||
|
@ -148,5 +148,9 @@ freerdp* freerdp_new()
|
||||
|
||||
void freerdp_free(freerdp* freerdp)
|
||||
{
|
||||
xfree(freerdp);
|
||||
if (freerdp)
|
||||
{
|
||||
rdp_free(freerdp->rdp);
|
||||
xfree(freerdp);
|
||||
}
|
||||
}
|
||||
|
@ -182,6 +182,7 @@ int gdi_DeleteDC(HGDI_DC hdc)
|
||||
{
|
||||
if (hdc->hwnd)
|
||||
{
|
||||
free(hdc->hwnd->cinvalid);
|
||||
free(hdc->hwnd->invalid);
|
||||
free(hdc->hwnd);
|
||||
}
|
||||
|
@ -885,6 +885,8 @@ void gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_comm
|
||||
{
|
||||
printf("Unsupported codecID %d\n", surface_bits_command->codecID);
|
||||
}
|
||||
|
||||
xfree(tile_bitmap);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -151,6 +151,7 @@ void rail_free(rdpRail* rail)
|
||||
icon_cache_free(rail->cache);
|
||||
window_list_free(rail->list);
|
||||
freerdp_uniconv_free(rail->uniconv);
|
||||
xfree(rail->clrconv);
|
||||
xfree(rail);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user