diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-01-29 12:29:18 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2009-01-29 12:29:18 +0000 |
commit | 52414c80acac74cbc486fb3fe4e3f5c0f7b8f85e (patch) | |
tree | 73a5224518e99dc8e53177ed8505a6f1bf3d673b | |
parent | 1c473c5b62f0ddfad0af5a683fc2d3251b597cae (diff) | |
download | gvfs-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | common/gvfsicon.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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; } |