From 964692ad4cec90888bb437064c53d8844db9f590 Mon Sep 17 00:00:00 2001 From: Aaron Boxer Date: Tue, 27 Sep 2022 11:36:02 -0400 Subject: [PATCH] wayland: clean wp_presentation_feedback in discard callback to avoid leak --- video/out/wayland_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index e4a590704b..8a9158e2b1 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1022,6 +1022,8 @@ static void feedback_presented(void *data, struct wp_presentation_feedback *fbac static void feedback_discarded(void *data, struct wp_presentation_feedback *fback) { + if (fback) + wp_presentation_feedback_destroy(fback); } static const struct wp_presentation_feedback_listener feedback_listener = {