Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c40ada2415b75c4aaabc9a097388ddcb > files > 14

mc-4.6.1-17mdv2008.0.src.rpm

--- mc/vfs/extfs.c	2005-05-27 07:19:19.000000000 -0700
+++ mc/vfs/extfs.c.new	2007-09-18 17:27:21.000000000 -0700
@@ -93,6 +93,7 @@ static struct entry *extfs_find_entry (s
 static int extfs_which (struct vfs_class *me, const char *path);
 static void extfs_remove_entry (struct entry *e);
 static void extfs_free (vfsid id);
+static void extfs_free_entry (struct entry *e);
 
 static struct vfs_class vfs_extfs_ops;
 static struct archive *first_archive = NULL;
@@ -190,14 +191,16 @@ static struct entry *extfs_generate_entr
     return entry;
 }
 
+#if 0
 static void extfs_free_entries (struct entry *entry)
 {
     return;
 }
+#endif
 
 static void extfs_free_archive (struct archive *archive)
 {
-    extfs_free_entries (archive->root_entry);
+    extfs_free_entry (archive->root_entry);
     if (archive->local_name != NULL) {
         struct stat my;
         
@@ -1218,15 +1221,14 @@ static void extfs_free (vfsid id)
     struct archive *parc;
     struct archive *archive = (struct archive *)id;
 
-    extfs_free_entry (archive->root_entry);
     if (archive == first_archive) {
         first_archive = archive->next;
     } else {
         for (parc = first_archive; parc != NULL; parc = parc->next)
-            if (parc->next == archive)
+            if (parc->next == archive) {
+                parc->next = archive->next;
                 break;
-        if (parc != NULL)
-            parc->next = archive->next;
+            }
     }
     extfs_free_archive (archive);
 }
@@ -1340,6 +1342,12 @@ static int extfs_which (struct vfs_class
 static void extfs_done (struct vfs_class *me)
 {
     int i;
+    struct archive *ar;
+
+    for (ar = first_archive; ar != NULL;) {
+	extfs_free ((vfsid) ar);
+	ar = first_archive;
+    }
 
     for (i = 0; i < extfs_no; i++ )
 	g_free (extfs_prefixes [i]);