GUACAMOLE-249: Free rdpBitmap and rdpGlyph within custom free handlers (not automatically freed like rdpPointer).
This commit is contained in:
parent
0926864ecb
commit
8dda26af54
@ -156,6 +156,13 @@ void guac_rdp_bitmap_free(rdpContext* context, rdpBitmap* bitmap) {
|
||||
if (buffer != NULL)
|
||||
guac_common_display_free_buffer(rdp_client->display, buffer);
|
||||
|
||||
/* NOTE: FreeRDP-allocated memory for the rdpBitmap will NOT be
|
||||
* automatically released after this free handler is invoked, thus we must
|
||||
* do so manually here */
|
||||
|
||||
_aligned_free(bitmap->data);
|
||||
free(bitmap);
|
||||
|
||||
}
|
||||
|
||||
BOOL guac_rdp_bitmap_setsurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary) {
|
||||
|
@ -121,6 +121,13 @@ void guac_rdp_glyph_free(rdpContext* context, rdpGlyph* glyph) {
|
||||
cairo_surface_destroy(((guac_rdp_glyph*) glyph)->surface);
|
||||
free(image_buffer);
|
||||
|
||||
/* NOTE: FreeRDP-allocated memory for the rdpGlyph will NOT be
|
||||
* automatically released after this free handler is invoked, thus we must
|
||||
* do so manually here */
|
||||
|
||||
free(glyph->aj);
|
||||
free(glyph);
|
||||
|
||||
}
|
||||
|
||||
BOOL guac_rdp_glyph_begindraw(rdpContext* context, INT32 x, INT32 y,
|
||||
|
@ -95,6 +95,9 @@ void guac_rdp_pointer_free(rdpContext* context, rdpPointer* pointer) {
|
||||
/* Free buffer */
|
||||
guac_common_display_free_buffer(rdp_client->display, buffer);
|
||||
|
||||
/* NOTE: FreeRDP-allocated memory for the rdpPointer will be automatically
|
||||
* released after this free handler is invoked */
|
||||
|
||||
}
|
||||
|
||||
BOOL guac_rdp_pointer_set_null(rdpContext* context) {
|
||||
|
Loading…
Reference in New Issue
Block a user