[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 <[EMAIL PROTECTED]>

 sha1_file.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

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
                        return NULL;
+               free(buffer);
                /* Now we have the ID of the referred-to object in
                 * actual_sha1.  Check again. */
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to