Index: libgnomevfs/gnome-vfs-utils.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-utils.c,v
retrieving revision 1.102
diff -u -p -r1.102 gnome-vfs-utils.c
--- libgnomevfs/gnome-vfs-utils.c	15 Sep 2005 11:02:53 -0000	1.102
+++ libgnomevfs/gnome-vfs-utils.c	10 Oct 2005 19:37:24 -0000
@@ -1991,9 +1993,14 @@ _gnome_vfs_uri_resolve_all_symlinks_uri 
 			resolved_uri = gnome_vfs_uri_resolve_relative (new_uri,
 								       info->symlink_name);
 			if (*p != 0) {
+				gnome_vfs_uri_unref (new_uri);
+
+				new_uri = gnome_vfs_uri_append_string (resolved_uri, p);
+
 				gnome_vfs_uri_unref (uri);
-				uri = gnome_vfs_uri_append_string (resolved_uri, p);
 				gnome_vfs_uri_unref (resolved_uri);
+
+				uri = gnome_vfs_uri_ref (new_uri);
 			} else {
 				gnome_vfs_uri_unref (uri);
 				uri = resolved_uri;
