Index: libgnomevfs/gnome-vfs-utils.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-utils.c,v
retrieving revision 1.66
diff -u -r1.66 gnome-vfs-utils.c
--- libgnomevfs/gnome-vfs-utils.c	25 Apr 2003 11:03:22 -0000	1.66
+++ libgnomevfs/gnome-vfs-utils.c	15 May 2003 22:21:40 -0000
@@ -774,7 +774,7 @@
        	int statfs_result;
 	const char *path, *scheme;
 	char *unescaped_path;
-	GnomeVFSResult ret;
+
 #if HAVE_STATVFS
 	struct statvfs statfs_buffer;
 #else
@@ -788,8 +788,6 @@
 		return GNOME_VFS_ERROR_NOT_SUPPORTED;
 	}
 
-	unescaped_path = gnome_vfs_unescape_string (path, G_DIR_SEPARATOR_S);
-	
 	scheme = gnome_vfs_uri_get_scheme (vfs_uri);
 	
         /* We only handle the file scheme for now */
@@ -797,27 +795,26 @@
 		return GNOME_VFS_ERROR_NOT_SUPPORTED;
 	}
 
+	unescaped_path = gnome_vfs_unescape_string (path, G_DIR_SEPARATOR_S);
+	
 #if HAVE_STATVFS
 	statfs_result = statvfs (unescaped_path, &statfs_buffer);
 #else
 	statfs_result = statfs (unescaped_path, &statfs_buffer);   
 #endif  
 
-	if (statfs_result == 0) {
-		ret = GNOME_VFS_OK;
-	} else {
-		ret = gnome_vfs_result_from_errno ();
+	g_free (unescaped_path);
+
+	if (statfs_result != 0) {
+		return gnome_vfs_result_from_errno ();
 	}
 	
-	g_return_val_if_fail (statfs_result == 0, FALSE);
 	block_size = statfs_buffer.f_bsize; 
 	free_blocks = statfs_buffer.f_bavail;
 
 	*size = block_size * free_blocks;
-
-	g_free (unescaped_path);
 	
-	return ret;
+	return GNOME_VFS_OK;
 }
 
 char *
Index: modules/file-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/file-method.c,v
retrieving revision 1.118
diff -u -r1.118 file-method.c
--- modules/file-method.c	24 Apr 2003 15:46:22 -0000	1.118
+++ modules/file-method.c	15 May 2003 22:21:41 -0000
@@ -957,7 +957,9 @@
 		struct stat statbuf;
 		if (stat (path, &statbuf) == 0) {
 			char *type = filesystem_type (path, path, &statbuf);
-			gboolean is_local = strcmp (type, "nfs") && strcmp (type, "afs");
+			gboolean is_local = ((strcmp (type, "nfs") != 0) && 
+					     (strcmp (type, "afs") != 0) &&
+					     (strcmp (type, "ncpfs") != 0));
 			local = GINT_TO_POINTER (is_local ? 1 : -1);
 			g_hash_table_insert (fstype_hash, path, local);
 		}
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1542
diff -u -r1.1542 ChangeLog
--- ChangeLog	14 May 2003 13:47:54 -0000	1.1542
+++ ChangeLog	15 May 2003 22:21:54 -0000
@@ -1,3 +1,11 @@
+2003-05-15 <radu@netsoft.ro>
+           Christophe Fergeau <teuf@users.sourceforge.net>
+
+	* libgnomevfs/gnome-vfs-utils.c(gnome_vfs_get_volume_free_space): 
+	fixed a leak when the function was called with an non-file:// uri
+	* modules/file-method.c(do_is_local): ncpfs file systems aren't local
+	(fixes #97789) 
+
 2003-05-14  Pasupathi Duraisamy <pasupathi.duraisamy@wipro.com>
 
 	* configure.in: check "getdelim" in AC_CHECK_FUNCS
