From: Thadeu Lima de Souza Cascardo Date: Sat, 7 Feb 2009 01:37:41 +0000 (-0200) Subject: Return a copy of a string in ghashtable configuration module. X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fatompub.git;a=commitdiff_plain;h=1c9aac9038f28baba924c05c2d184a3463ffd997 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. --- 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 *