From: Sergey Vlasov Date: Mon, 8 Aug 2005 18:44:43 +0000 (+0400) Subject: [PATCH] Plug memory leak in read_object_with_reference() X-Git-Tag: v0.99.4~5^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1cf58e72225f45472124266c020f8595988374d8?ds=inline;hp=--cc [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 Signed-off-by: Junio C Hamano --- 1cf58e72225f45472124266c020f8595988374d8 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. */ }