[PATCH] Implement git-checkout-cache -u to update stat information in the cache.
[gitweb.git] / ls-tree.c
index 7f8f8644afbcec3eac39230cabbd1298ceaa537d..a69eac87a8db3da6d13ecf28d70609e20941f00c 100644 (file)
--- a/ls-tree.c
+++ b/ls-tree.c
@@ -24,7 +24,7 @@ static void print_path_prefix(struct path_prefix *prefix)
 }
 
 static void list_recursive(void *buffer,
-                          const unsigned char *type,
+                          const char *type,
                           unsigned long size,
                           struct path_prefix *prefix)
 {
@@ -77,6 +77,7 @@ static int list(unsigned char *sha1)
        if (!buffer)
                die("unable to read sha1 file");
        list_recursive(buffer, "tree", size, NULL);
+       free(buffer);
        return 0;
 }