summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index 5835b40b0c..c31b461662 100644
--- a/refs.c
+++ b/refs.c
@@ -360,6 +360,7 @@ static int resolve_gitlink_packed_ref(char *name, int pathlen, const char *refna
f = fopen(name, "r");
if (!f)
return -1;
+ memset(&refs, 0, sizeof(refs));
read_packed_refs(f, &refs);
fclose(f);
ref = search_ref_array(&refs.packed, refname);