author | Sergey Vlasov <vsu@altlinux.ru> | |
Mon, 8 Aug 2005 18:45:36 +0000 (22:45 +0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 9 Aug 2005 05:51:45 +0000 (22:51 -0700) | ||
commit | bfc66daf5c0dcb1a507ff2533760ac5505eee6a3 | |
tree | 9c1182bc1cf0b818f39c777eae225659a872c369 | tree | snapshot |
parent | 1cf58e72225f45472124266c020f8595988374d8 | commit | diff |
[PATCH] Plug memory leak in write_sha1_to_fd()
If the object to write was packed, both its uncompressed and compressed
data were leaked. If the object was not packed, its file was not unmapped.
[jc: I think it still leaks on the write error path of
write_sha1_to_fd(), but that should be fixable in a small separate
patch.]
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If the object to write was packed, both its uncompressed and compressed
data were leaked. If the object was not packed, its file was not unmapped.
[jc: I think it still leaks on the write error path of
write_sha1_to_fd(), but that should be fixable in a small separate
patch.]
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |