aboutsummaryrefslogtreecommitdiff
path: root/fsck-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 23:33:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-10 23:33:52 -0700
commit91af81a98ea5c5594c67a63abc933250e05c13c6 (patch)
treed32ad1f96650d7da0d9b7043eeece8235da67b82 /fsck-cache.c
parentf1257f3a33c49ea4f3fd43c7aed97d8a270190dd (diff)
downloadgit-91af81a98ea5c5594c67a63abc933250e05c13c6.tar.gz
git-91af81a98ea5c5594c67a63abc933250e05c13c6.tar.xz
Oops. Fix bad initialization of the "seen" array, causing us to not
properly clear the reference count at init time. It happened to work for me by pure luck. Until it broke, and my unreferenced commit suddenly looked referenced again. Fixed.
Diffstat (limited to 'fsck-cache.c')
-rw-r--r--fsck-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index 87366f0e5..bb5cf196a 100644
--- a/fsck-cache.c
+++ b/fsck-cache.c
@@ -106,7 +106,7 @@ static int mark_sha1_seen(unsigned char *sha1, char *tag)
seen = realloc(seen, alloc_seen*sizeof(struct seen));
}
s = seen + nr_seen;
- memset(s, 0, sizeof(s));
+ memset(s, 0, sizeof(*s));
nr_seen++;
memcpy(s->sha1, sha1, 20);
strncpy(s->tag, tag, sizeof(s->tag));