[PATCH 1/4] Plug memory leak in read_object_with_reference()
- From
Sergey Vlasov <vsu@altlinux.ru>
- Date
- Aug 8, 2005, 18:44 UTC
- Message-ID
- <20050808184443.GB5789@procyon.home>
- In-Reply-To
- <20050808184332.GA5789@procyon.home>
[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> ---
sha1_file.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
f7d16d6b83698fd7858ad28340b3e87780322261
diff --git a/sha1_file.c b/sha1_file.c --- a/sha1_file.c +++ b/sha1_file.c @@ -1165,6 +1165,7 @@ void *read_object_with_reference(const u free(buffer); return NULL; } + free(buffer); /* Now we have the ID of the referred-to object in * actual_sha1. Check again. */ }