Fix up previous commit
[git.git] / ls-tree.c
index 7f8f864..30dfcdd 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,10 +77,11 @@ static int list(unsigned char *sha1)
        if (!buffer)
                die("unable to read sha1 file");
        list_recursive(buffer, "tree", size, NULL);
+       free(buffer);
        return 0;
 }
 
-static const char *ls_tree_usage = "ls-tree [-r] [-z] <key>";
+static const char *ls_tree_usage = "git-ls-tree [-r] [-z] <key>";
 
 int main(int argc, char **argv)
 {