summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2010-01-28 14:52:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-28 17:30:14 (GMT)
commitaf86debc8620006702ef217d5b7687b300c75104 (patch)
treedc318ae16b294890642d4303107e3fc80a2f6f18
parent8e52dc30fc357755985306f2faae4fcfd038e0f3 (diff)
downloadgit-af86debc8620006702ef217d5b7687b300c75104.zip
git-af86debc8620006702ef217d5b7687b300c75104.tar.gz
git-af86debc8620006702ef217d5b7687b300c75104.tar.bz2
rerere: fix too-short initialization
This was caused by a typo in the sizeof parameter, and meant we looked at uninitialized memory. Caught by valgrind in t2030. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--rerere.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rerere.c b/rerere.c
index a86d73d..d1d3e75 100644
--- a/rerere.c
+++ b/rerere.c
@@ -325,7 +325,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
for (i = 0; i < 3; i++)
free(mmfile[i].ptr);
- memset(&io, 0, sizeof(&io));
+ memset(&io, 0, sizeof(io));
io.io.getline = rerere_mem_getline;
if (output)
io.io.output = fopen(output, "w");