t1510-repo-setup: mark as untraceable with '-x'
[gitweb.git] / builtin / fsck.c
index 7a8a679d4f3d0cf6d95991927947cbd00359868c..9981db22637c027019c206583f24dc2b665deeff 100644 (file)
@@ -180,7 +180,13 @@ static void mark_object_reachable(struct object *obj)
 
 static int traverse_one_object(struct object *obj)
 {
-       return fsck_walk(obj, obj, &fsck_walk_options);
+       int result = fsck_walk(obj, obj, &fsck_walk_options);
+
+       if (obj->type == OBJ_TREE) {
+               struct tree *tree = (struct tree *)obj;
+               free_tree_buffer(tree);
+       }
+       return result;
 }
 
 static int traverse_reachable(void)