From c0a5e7b7890928a52aa42b131f584ef3acbd5bde Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 26 Aug 2002 16:14:35 +0000 Subject: call g_strdup in the correct place, or we'll return the internal copy. 2002-08-26 Rodrigo Moya * e-config-listener.c (e_config_listener_get_string_with_default): call g_strdup in the correct place, or we'll return the internal copy. svn path=/trunk/; revision=17860 --- e-util/ChangeLog | 5 +++++ e-util/e-config-listener.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index d70eb132f9..9b2788118a 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2002-08-26 Rodrigo Moya + + * e-config-listener.c (e_config_listener_get_string_with_default): + call g_strdup in the correct place, or we'll return the internal copy. + 2002-08-26 Rodrigo Moya * e-config-listener.c (e_config_listener_set_long): only set the key diff --git a/e-util/e-config-listener.c b/e-util/e-config-listener.c index 88debbd8b0..028f5ecc8e 100644 --- a/e-util/e-config-listener.c +++ b/e-util/e-config-listener.c @@ -364,14 +364,14 @@ e_config_listener_get_string_with_default (EConfigListener *cl, g_assert (kd != NULL); if (kd->type == GTK_TYPE_STRING) { - str = g_strdup (kd->value.v_str); + str = kd->value.v_str; if (used_default != NULL) *used_default = kd->used_default; } else return NULL; } - return str; + return g_strdup (str); } void -- cgit v1.2.3