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>
This commit is contained in:
Linus Torvalds
2006-05-29 12:16:12 -07:00
committed by Junio C Hamano
parent e0c97ca63d
commit 136f2e548a
6 changed files with 36 additions and 34 deletions

View File

@ -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) {