From 1c9aac9038f28baba924c05c2d184a3463ffd997 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Fri, 6 Feb 2009 23:37:41 -0200 Subject: [PATCH] Return a copy of a string in ghashtable configuration module. Since gkeyfile module returns a string copy that must be freed, other modules must do as well, to avoid releasing a static or stack string or double-freeing a dynamic one. --- config/ghashtable/ghashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/ghashtable/ghashtable.c b/config/ghashtable/ghashtable.c index ab32036..f5a946b 100644 --- a/config/ghashtable/ghashtable.c +++ b/config/ghashtable/ghashtable.c @@ -75,7 +75,7 @@ ghashtable_atom_config_get_str (AtomCtx *ctx, gchar *group, gchar * key) atom_error_message_set (aerr, "Could not find configuration value"); atom_error_set (ctx, aerr); } - return value; + return g_strdup (value); } AtomConfig * -- 2.20.1