Code

Fix mmap leak caused by reading bad indexes.
authorShawn O. Pearce <spearce@spearce.org>
Wed, 7 Mar 2007 01:44:11 +0000 (20:44 -0500)
committerJunio C Hamano <junkio@cox.net>
Wed, 7 Mar 2007 18:41:33 +0000 (10:41 -0800)
commit2d88451b7a8cdd8bc233c7910c775bbb0ac76457
tree476ded1e59e81b1d99ba1eca0cbe99d3fec89798
parent30fee0625d9e7012a3baf92c1315cfde751b8582
Fix mmap leak caused by reading bad indexes.

If an index is corrupt, or is simply too new for us to understand,
we were leaking the mmap that held the entire content of the index.
This could be a considerable size on large projects, given that
the index is at least 24 bytes * nr_objects.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c