[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>
This commit is contained in:
Sergey Vlasov 2005-08-08 22:44:43 +04:00 committed by Junio C Hamano
parent 35c3c62983
commit 1cf58e7222

View File

@ -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. */
}