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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3188>
This commit is contained in:
Sebastian Keller 2023-08-12 15:32:18 +02:00
parent 90a00dae99
commit 03ba3a825e

View File

@ -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);