summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server-info.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/server-info.c b/server-info.c
index a9e5607f2f..3c08a288db 100644
--- a/server-info.c
+++ b/server-info.c
@@ -59,6 +59,16 @@ static struct object *parse_object_cheap(const unsigned char *sha1)
struct commit *commit = (struct commit *)o;
free(commit->buffer);
commit->buffer = NULL;
+ } else if (o->type == tree_type) {
+ struct tree *tree = (struct tree *)o;
+ struct tree_entry_list *e, *n;
+ for (e = tree->entries; e; e = n) {
+ free(e->name);
+ e->name = NULL;
+ n = e->next;
+ free(e);
+ }
+ tree->entries = NULL;
}
return o;
}