summaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-04-03 16:33:46 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-04 02:04:56 (GMT)
commitbbf4b41baff11d9fdc353c60527f258e84223121 (patch)
treeeac8d7caea090c090bd8c588c04fb6ba8632a73b /index-pack.c
parenta8f4ef727a7e626f23878e7e3f9f19f0a1052df0 (diff)
downloadgit-bbf4b41baff11d9fdc353c60527f258e84223121.zip
git-bbf4b41baff11d9fdc353c60527f258e84223121.tar.gz
git-bbf4b41baff11d9fdc353c60527f258e84223121.tar.bz2
Plug memory leak in index-pack collision checking codepath.
Diffstat (limited to 'index-pack.c')
-rw-r--r--index-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/index-pack.c b/index-pack.c
index 6284fe3..3c768fb 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -358,6 +358,7 @@ static void sha1_object(const void *data, unsigned long size,
if (size != has_size || type != has_type ||
memcmp(data, has_data, size) != 0)
die("SHA1 COLLISION FOUND WITH %s !", sha1_to_hex(sha1));
+ free(has_data);
}
}