From 572801c02fe6dd03d31ae63d1276a8fbba9e2163 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 4 Mar 2024 14:21:34 +0100 Subject: [PATCH] screen-cast: Clear GError within loop In order to silence warnings and/or prevent memory leaks. Fixes: dc2b2e379b (screen-cast-stream: Add explicit modifier support) Part-of: --- src/backends/meta-screen-cast.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backends/meta-screen-cast.c b/src/backends/meta-screen-cast.c index 82d67ad5e..0089bc2d9 100644 --- a/src/backends/meta-screen-cast.c +++ b/src/backends/meta-screen-cast.c @@ -153,6 +153,8 @@ meta_screen_cast_get_preferred_modifier (MetaScreenCast *screen_cast, { int i; + g_clear_error (&error); + for (i = 0; i < modifiers->len; i++) { if (g_array_index (modifiers, uint64_t, i) == *preferred_modifier)