From: Junio C Hamano Date: Tue, 28 Jun 2005 21:55:16 +0000 (-0700) Subject: [PATCH] Bugfix: initialize pack_base to NULL. X-Git-Tag: v0.99~138 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d85a4feeee2cb94ff7060de45a5421f575ddf7b8;p=git.git [PATCH] Bugfix: initialize pack_base to NULL. This was causing random segfaults, because use_packed_git() got confused by random garbage there. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- diff --git a/sha1_file.c b/sha1_file.c index 6e3fd180..5c6e964a 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -396,6 +396,7 @@ static struct packed_git *add_packed_git(char *path, int path_len) 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; }