From 300b9e48ebcf996270d245bb5bba9a0a2da44457 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 21 Sep 2007 01:25:11 +0000 Subject: [PATCH] 2007-09-20 Dan Williams * libnm-util/nm-setting.c - (convert_strv_to_slist): dupe the values in the list because since the list is a boxed value, it'll get destroyed when it's container (like a hash table or whatever) gets destroyed git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2835 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- ChangeLog | 7 +++++++ libnm-util/nm-setting.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1fefd9dda5..a9d36b1e94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-20 Dan Williams + + * libnm-util/nm-setting.c + - (convert_strv_to_slist): dupe the values in the list because since + the list is a boxed value, it'll get destroyed when it's container + (like a hash table or whatever) gets destroyed + 2007-09-20 Tambet Ingo * libnm-util/nm-setting.h: Change the type of NMSettingVPN->routes to diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c index 079975ca14..60153f29fd 100644 --- a/libnm-util/nm-setting.c +++ b/libnm-util/nm-setting.c @@ -240,7 +240,7 @@ convert_strv_to_slist (char **str) guint i = 0; while (str[i]) - list = g_slist_prepend (list, str[i++]); + list = g_slist_prepend (list, g_strdup (str[i++])); return g_slist_reverse (list); }