diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2023-08-06 13:13:07 -0400 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2023-08-06 21:27:54 +0200 |
| commit | 10df946671a12b4c0f4c13d4556a8bae6fc30394 (patch) | |
| tree | d4166e3dbfed91f40a1fef9e87c2f38461d00c79 | |
| parent | 2018673e1df020fba73870a9f65314d195d72769 (diff) | |
Fix Wayland object leaks when outputs are destroyed
| -rw-r--r-- | main.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -97,12 +97,18 @@ static void destroy_surface(struct swaylock_surface *surface) { if (surface->ext_session_lock_surface_v1 != NULL) { ext_session_lock_surface_v1_destroy(surface->ext_session_lock_surface_v1); } + if (surface->subsurface) { + wl_subsurface_destroy(surface->subsurface); + } + if (surface->child) { + wl_surface_destroy(surface->child); + } if (surface->surface != NULL) { wl_surface_destroy(surface->surface); } destroy_buffer(&surface->indicator_buffers[0]); destroy_buffer(&surface->indicator_buffers[1]); - wl_output_destroy(surface->output); + wl_output_release(surface->output); free(surface); } |
