summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-01-29 12:29:18 +0000
committerAlexander Larsson <alexl@src.gnome.org>2009-01-29 12:29:18 +0000
commit52414c80acac74cbc486fb3fe4e3f5c0f7b8f85e (patch)
tree73a5224518e99dc8e53177ed8505a6f1bf3d673b
parent1c473c5b62f0ddfad0af5a683fc2d3251b597cae (diff)
downloadgvfs-52414c80acac74cbc486fb3fe4e3f5c0f7b8f85e.tar.gz
Dup string to avoid double free later.
2009-01-29 Alexander Larsson <alexl@redhat.com> * common/gvfsicon.c: (g_vfs_icon_to_tokens): Dup string to avoid double free later. svn path=/trunk/; revision=2186
-rw-r--r--ChangeLog6
-rw-r--r--common/gvfsicon.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a77f3e0c..8889077a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-29 Alexander Larsson <alexl@redhat.com>
+
+ * common/gvfsicon.c:
+ (g_vfs_icon_to_tokens):
+ Dup string to avoid double free later.
+
2009-01-28 Ryan Lortie <desrt@desrt.ca>
Bug 569480 – trash backend crashes due to invalid write
diff --git a/common/gvfsicon.c b/common/gvfsicon.c
index 29dacbd8..62a29f1e 100644
--- a/common/gvfsicon.c
+++ b/common/gvfsicon.c
@@ -226,7 +226,7 @@ g_vfs_icon_to_tokens (GIcon *icon,
s = g_mount_spec_to_string (vfs_icon->mount_spec);
g_ptr_array_add (tokens, s);
- g_ptr_array_add (tokens, vfs_icon->icon_id);
+ g_ptr_array_add (tokens, g_strdup (vfs_icon->icon_id));
return TRUE;
}