From 9c9f767986584660c9feda9639338af7394a1267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Thu, 22 Apr 2021 10:55:04 +0200 Subject: [PATCH] fbd-feedback-manager: Don't leak config_path It's assigned multiple times. --- src/fbd-feedback-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fbd-feedback-manager.c b/src/fbd-feedback-manager.c index 1e1cccd..ece1fe2 100644 --- a/src/fbd-feedback-manager.c +++ b/src/fbd-feedback-manager.c @@ -437,7 +437,6 @@ find_themefile (void) g_autoptr (GError) err = NULL; gchar **xdg_data_dirs = (gchar **) g_get_system_data_dirs (); - g_autofree gchar *config_path = NULL; g_autofree gchar *compatibles = NULL; // Try to read the device name @@ -453,6 +452,8 @@ find_themefile (void) // Iterate over $XDG_DATA_DIRS for (i = 0; i < g_strv_length (xdg_data_dirs); i++) { + g_autofree gchar *config_path = NULL; + config_path = g_strconcat (xdg_data_dirs[i], "feedbackd/themes/", comp, ".json", NULL); g_debug ("Searching for device specific themefile in %s", config_path);