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:

committed by
Junio C Hamano

parent
e0c97ca63d
commit
136f2e548a
@ -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) {
|
||||
|
Reference in New Issue
Block a user