summaryrefslogtreecommitdiff
path: root/fsck-objects.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-05-29 19:16:12 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-30 02:05:02 (GMT)
commit136f2e548a34f1f504b0f062f87ddf33e8d6e83b (patch)
treee5dcfa1d5325c5bbe1ba8e7f1295a298b3aa7091 /fsck-objects.c
parente0c97ca63df2590026fe1f9a76fefba54b291d06 (diff)
downloadgit-136f2e548a34f1f504b0f062f87ddf33e8d6e83b.zip
git-136f2e548a34f1f504b0f062f87ddf33e8d6e83b.tar.gz
git-136f2e548a34f1f504b0f062f87ddf33e8d6e83b.tar.bz2
Make "struct tree" contain the pointer to the tree buffer
This allows us to avoid allocating information for names etc, because we can just use the information from the tree buffer directly. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fsck-objects.c')
-rw-r--r--fsck-objects.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fsck-objects.c b/fsck-objects.c
index 1922b6d..5e65df4 100644
--- a/fsck-objects.c
+++ b/fsck-objects.c
@@ -198,17 +198,16 @@ static int fsck_tree(struct tree *item)
default:
break;
}
- free(last->name);
free(last);
}
last = entry;
}
- if (last) {
- free(last->name);
+ if (last)
free(last);
- }
item->entries = NULL;
+ free(item->buffer);
+ item->buffer = NULL;
retval = 0;
if (has_full_path) {