From cec6d57107e14e2fbb1b5a9e2ae7ab4a1c07f464 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Feb 2024 16:05:05 +1100 Subject: [PATCH] Fix memory leak with Wayland & LIBDECOR The configuration was cleared before freeing. --- intern/ghost/intern/GHOST_WindowWayland.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index 583b1411d51..e832a94cd7b 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -894,7 +894,6 @@ static void gwl_window_frame_update_from_pending_no_lock(GWL_Window *win) libdecor_frame_commit(decor.frame, state, configuration); libdecor_state_free(state); - decor.pending.configuration = nullptr; decor.pending.size[0] = 0; decor.pending.size[1] = 0; @@ -906,6 +905,8 @@ static void gwl_window_frame_update_from_pending_no_lock(GWL_Window *win) decor.pending.configuration_needs_free = false; } # endif + + decor.pending.configuration = nullptr; } } else