]> git.proxmox.com Git - qemu.git/commitdiff
zero file case (Paul Brook)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 13 Sep 2004 21:39:32 +0000 (21:39 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 13 Sep 2004 21:39:32 +0000 (21:39 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1064 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/path.c

index 9e49076dc8f50d69e6a418c38496b4b1c3d8979e..76809705a44ca34aa8f9aaa0c3ab282288fb1bfe 100644 (file)
@@ -101,7 +101,12 @@ void init_paths(const char *prefix)
 
     base = new_entry("", NULL, prefix+1);
     base = add_dir_maybe(base);
-    set_parents(base, base);
+    if (base->num_entries == 0) {
+        free (base);
+        base = NULL;
+    } else {
+        set_parents(base, base);
+    }
 }
 
 /* FIXME: Doesn't handle DIR/.. where DIR is not in emulated dir. */