From 03ba3a825e7cf848705f76494b368d7cbfeb6353 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Sat, 12 Aug 2023 15:32:18 +0200 Subject: [PATCH] context: Fix a small leak in meta_context_main_get_x11_display_policy() The caller of sd_pid_get_user_unit() is supposed to free the unit name string. Part-of: --- src/core/meta-context-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/meta-context-main.c b/src/core/meta-context-main.c index b40384f13..f464d8f0b 100644 --- a/src/core/meta-context-main.c +++ b/src/core/meta-context-main.c @@ -322,7 +322,7 @@ meta_context_main_get_x11_display_policy (MetaContext *context) MetaCompositorType compositor_type; #ifdef HAVE_WAYLAND MetaContextMain *context_main = META_CONTEXT_MAIN (context); - char *unit; + g_autofree char *unit = NULL; #endif compositor_type = meta_context_get_compositor_type (context);