mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
egl/wayland: plug leaks in dri2_wl_create_window_surface() error path
We forgot to teardown the wl display/surface wrappers.
Fixes: 03dd9a88b0 ("egl/wayland: Use per-surface event queues")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
2f76dff65f
commit
83442112d7
1 changed files with 6 additions and 2 deletions
|
|
@ -190,7 +190,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
|||
dri2_surf->wl_surface_wrapper = get_wl_surface_proxy(window);
|
||||
if (!dri2_surf->wl_surface_wrapper) {
|
||||
_eglError(EGL_BAD_ALLOC, "dri2_create_surface");
|
||||
goto cleanup_drm;
|
||||
goto cleanup_dpy_wrapper;
|
||||
}
|
||||
wl_proxy_set_queue((struct wl_proxy *)dri2_surf->wl_surface_wrapper,
|
||||
dri2_surf->wl_queue);
|
||||
|
|
@ -218,13 +218,17 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
|
|||
dri2_surf);
|
||||
if (dri2_surf->dri_drawable == NULL) {
|
||||
_eglError(EGL_BAD_ALLOC, "createNewDrawable");
|
||||
goto cleanup_surf;
|
||||
goto cleanup_surf_wrapper;
|
||||
}
|
||||
|
||||
dri2_surf->base.SwapInterval = dri2_dpy->default_swap_interval;
|
||||
|
||||
return &dri2_surf->base;
|
||||
|
||||
cleanup_surf_wrapper:
|
||||
wl_proxy_wrapper_destroy(dri2_surf->wl_surface_wrapper);
|
||||
cleanup_dpy_wrapper:
|
||||
wl_proxy_wrapper_destroy(dri2_surf->wl_dpy_wrapper);
|
||||
cleanup_drm:
|
||||
if (dri2_surf->wl_drm_wrapper)
|
||||
wl_proxy_wrapper_destroy(dri2_surf->wl_drm_wrapper);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue