]> Git Repo - qemu.git/blobdiff - util/path.c
target-ppc: Enable FSCR facility check for TAR
[qemu.git] / util / path.c
index f0c69627c7e8d1537e4a20642260fa2329e2768d..5c59d9f1d3bf33a8b6ce6556d2f53b6397d53eab 100644 (file)
@@ -39,7 +39,7 @@ static int strneq(const char *s1, unsigned int n, const char *s2)
 }
 
 static struct pathelem *add_entry(struct pathelem *root, const char *name,
-                                  unsigned char type);
+                                  unsigned type);
 
 static struct pathelem *new_entry(const char *root,
                                   struct pathelem *parent,
@@ -82,7 +82,7 @@ static struct pathelem *add_dir_maybe(struct pathelem *path)
 }
 
 static struct pathelem *add_entry(struct pathelem *root, const char *name,
-                                  unsigned char type)
+                                  unsigned type)
 {
     struct pathelem **e;
 
@@ -160,7 +160,9 @@ void init_paths(const char *prefix)
     base = new_entry("", NULL, pref_buf);
     base = add_dir_maybe(base);
     if (base->num_entries == 0) {
-        free (base);
+        g_free(base->pathname);
+        free(base->name);
+        free(base);
         base = NULL;
     } else {
         set_parents(base, base);
This page took 0.023537 seconds and 4 git commands to generate.