[PATCH] Bugfix: initialize pack_base to NULL.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Jun 28, 2005, 21:55 UTC
- Message-ID
- <7vvf3ytad7.fsf_-_@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.58.0506281424420.19755@ppc970.osdl.org>
This was causing random segfaults, because use_packed_git() got confused by random garbage there.
Signed-off-by: Junio C Hamano <junkio@cox.net> ---
sha1_file.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
facb119577a28bbb3f2ac1e5f8db37fd2f6d31d8
diff --git a/sha1_file.c b/sha1_file.c --- a/sha1_file.c +++ b/sha1_file.c @@ -395,6 +395,7 @@ static struct packed_git *add_packed_git p->pack_size = st.st_size; p->index_base = idx_map; p->next = NULL; + p->pack_base = NULL; p->pack_last_used = 0; return p; } ------------