Merge branch 'wip/otte/for-main' into 'main'

x11: Fix memleak

Closes #6404

See merge request GNOME/gtk!6847
This commit is contained in:
Benjamin Otte
2024-02-07 06:52:08 +00:00

View File

@@ -316,7 +316,10 @@ gdk_x11_gl_context_glx_get_damage (GdkGLContext *context)
for (i = 0; i < buffer_age - 1; i++)
{
if (context->old_updated_area[i] == NULL)
return GDK_GL_CONTEXT_CLASS (gdk_x11_gl_context_glx_parent_class)->get_damage (context);
{
cairo_region_destroy (damage);
return GDK_GL_CONTEXT_CLASS (gdk_x11_gl_context_glx_parent_class)->get_damage (context);
}
cairo_region_union (damage, context->old_updated_area[i]);
}