summaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-05-25 04:01:50 +0200
committerJunio C Hamano <junkio@cox.net>2007-05-25 04:01:50 +0200
commit76026200eee9fea016c2d87f472bb13cb15f47b2 (patch)
tree0c1f5eb37f018f48f355daf27fcbfb7c2a755858 /object.c
parentMerge branch 'maint' of git://repo.or.cz/git/fastimport into maint (diff)
parentfix memory leak in parse_object when check_sha1_signature fails (diff)
downloadgit-76026200eee9fea016c2d87f472bb13cb15f47b2.tar.xz
git-76026200eee9fea016c2d87f472bb13cb15f47b2.zip
Merge branch 'maint-1.5.1' into maint
* maint-1.5.1: fix memory leak in parse_object when check_sha1_signature fails name-rev: tolerate clock skew in committer dates
Diffstat (limited to 'object.c')
-rw-r--r--object.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/object.c b/object.c
index 37d1363359..cfc4969ed9 100644
--- a/object.c
+++ b/object.c
@@ -176,6 +176,7 @@ struct object *parse_object(const unsigned char *sha1)
if (buffer) {
struct object *obj;
if (check_sha1_signature(sha1, buffer, size, typename(type)) < 0) {
+ free(buffer);
error("sha1 mismatch %s\n", sha1_to_hex(sha1));
return NULL;
}