author | Björn Steinbrink <B.Steinbrink@gmx.de> | |
Sat, 18 Oct 2008 00:37:31 +0000 (02:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 18 Oct 2008 13:19:06 +0000 (06:19 -0700) | ||
commit | 1fb23e65503b4927fa1d4b59f9fbe27668ce347d | |
tree | e74dba546b3962bd66ab24cee8b25d6d0cc97a02 | tree | snapshot |
parent | 72130808173d3dfee85f2a29548fa9fec33a5351 | commit | diff |
force_object_loose: Fix memory leak
read_packed_sha1 expectes its caller to free the buffer it returns, which
force_object_loose didn't do.
This leak is eventually triggered by "git gc", when it is manually invoked
or there are too many packs around, making gc totally unusable when there
are lots of unreachable objects.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read_packed_sha1 expectes its caller to free the buffer it returns, which
force_object_loose didn't do.
This leak is eventually triggered by "git gc", when it is manually invoked
or there are too many packs around, making gc totally unusable when there
are lots of unreachable objects.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c | diff | blob | history |