git-apply --whitespace=fix: fix whitespace fuzz introduced by previous run
[gitweb.git] / list-objects.c
index 310f8d39082a12d2c3daddd1fca454686e7425c3..4ef58e7ec01ebdfc6f036ccafaf837b2b38ed7a5 100644 (file)
@@ -87,7 +87,7 @@ static void process_tree(struct rev_info *revs,
                        process_tree(revs,
                                     lookup_tree(entry.sha1),
                                     p, &me, entry.path);
-               else if (S_ISDIRLNK(entry.mode))
+               else if (S_ISGITLINK(entry.mode))
                        process_gitlink(revs, entry.sha1,
                                        p, &me, entry.path);
                else
@@ -170,4 +170,11 @@ void traverse_commit_list(struct rev_info *revs,
        }
        for (i = 0; i < objects.nr; i++)
                show_object(&objects.objects[i]);
+       free(objects.objects);
+       if (revs->pending.nr) {
+               free(revs->pending.objects);
+               revs->pending.nr = 0;
+               revs->pending.alloc = 0;
+               revs->pending.objects = NULL;
+       }
 }