X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=ls-tree.c;h=30dfcddf74b2d97d9ee2d54bfbb5bfa5cb3160ee;hb=de809dbbce497e0d107562615c1d85ff35b4e0c5;hp=7f8f8644afbcec3eac39230cabbd1298ceaa537d;hpb=3d0291c4506f4bfa3869771e580b7304817fec00;p=git.git diff --git a/ls-tree.c b/ls-tree.c index 7f8f8644..30dfcddf 100644 --- 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] "; +static const char *ls_tree_usage = "git-ls-tree [-r] [-z] "; int main(int argc, char **argv) {