summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2005-08-08 22:44:43 +0400
committerJunio C Hamano <junkio@cox.net>2005-08-08 22:51:45 -0700
commit1cf58e72225f45472124266c020f8595988374d8 (patch)
tree3ce0cfbb3543a26988e8739249c5d9b29eaa5fa3 /sha1_file.c
parent35c3c6298308563a3dd4a5c4bb0870748833643f (diff)
downloadgit-1cf58e72225f45472124266c020f8595988374d8.tar.gz
[PATCH] Plug memory leak in read_object_with_reference()
When following a reference, read_object_with_reference() did not free the intermediate object data. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index a17a6d13b2..a4bf067986 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1165,6 +1165,7 @@ void *read_object_with_reference(const unsigned char *sha1,
free(buffer);
return NULL;
}
+ free(buffer);
/* Now we have the ID of the referred-to object in
* actual_sha1. Check again. */
}