From 8e05fa2728be2bb19ae1ea782ae1e5968b9e0fd0 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 17 Jun 2020 17:31:59 +0800 Subject: [PATCH] st: Don't leak st_describe_actor strings Hopefully this code doesn't get hit much. And it does seem to be the only user of the function. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1319 --- src/st/st-widget.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/st/st-widget.c b/src/st/st-widget.c index 615d5e477..9efffbd76 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -601,8 +601,11 @@ st_widget_get_theme_node (StWidget *widget) if (stage == NULL) { + g_autofree char *desc = st_describe_actor (CLUTTER_ACTOR (widget)); + g_critical ("st_widget_get_theme_node called on the widget %s which is not in the stage.", - st_describe_actor (CLUTTER_ACTOR (widget))); + desc); + return g_object_new (ST_TYPE_THEME_NODE, NULL); }