[gnome-software/wip/mcrha/plugin-loaded-init-memleak] gs-plugin-loader: Fix a memory leak in the init() function
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/mcrha/plugin-loaded-init-memleak] gs-plugin-loader: Fix a memory leak in the init() function
- Date: Fri, 18 Jun 2021 07:08:43 +0000 (UTC)
commit 34e4871263b4d4fc33f29ca823822e0707901d11
Author: Milan Crha <mcrha redhat com>
Date: Fri Jun 18 09:07:09 2021 +0200
gs-plugin-loader: Fix a memory leak in the init() function
A g_settings_get_string() returns a newly allocated string, not a const string.
lib/gs-plugin-loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index f1deb0f36..056171e40 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -2872,7 +2872,7 @@ gs_plugin_loader_init (GsPluginLoader *plugin_loader)
gchar *match;
gchar **projects;
guint i;
- const gchar *review_server;
+ g_autofree gchar *review_server = NULL;
g_autofree gchar *user_hash = NULL;
g_autoptr(GError) local_error = NULL;
const guint64 odrs_review_max_cache_age_secs = 237000; /* 1 week */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]