Skip to content
Snippets Groups Projects
Commit c2ee0776 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Steve Lhomme
Browse files

qt: compositor_wayland_module: fix leaks of wayland objects

parent 85f8fe67
No related branches found
No related tags found
1 merge request!4839Fix a serie of wayland object leaks in Qt and egl_gbm
Pipeline #430804 passed with stage
in 17 minutes and 48 seconds
......@@ -165,6 +165,9 @@ static void Close(qtwayland_t* obj)
{
qtwayland_priv_t* sys = (qtwayland_priv_t*)(obj->p_sys);
wl_display_flush(sys->display);
wl_subcompositor_destroy(sys->subcompositor);
wl_compositor_destroy(sys->compositor);
wl_event_queue_destroy(sys->queue);
}
......@@ -198,8 +201,16 @@ static bool Init(qtwayland_t* obj, void* qpni_display)
return true;
error:
if (sys->subcompositor)
wl_subcompositor_destroy(sys->subcompositor);
if (sys->compositor)
wl_compositor_destroy(sys->compositor);
if (sys->queue)
wl_event_queue_destroy(sys->queue);
sys->compositor = NULL;
sys->subcompositor = NULL;
sys->queue = NULL;
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment