author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 2 Feb 2007 08:00:03 +0000 (03:00 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 3 Feb 2007 05:33:18 +0000 (21:33 -0800) | ||
commit | 3cf8b462d2dbe78233bba5c0765ecaa2c6b6cd99 | |
tree | c2435bd80d4bdb7025cba8e37d8e0d6bfa45868f | tree | snapshot |
parent | 0d18e41e008e9ac1f371d090e2e1b85481221796 | commit | diff |
Don't leak file descriptors from unavailable pack files.
If open_packed_git failed it may have been because the packfile
actually exists and is readable, but some sort of verification
did not pass. In this case open_packed_git left pack_fd filled
in, as the file descriptor is valid. We don't want to leak the
file descriptor, nor do we want to allow someone in the future
to use this packed_git.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If open_packed_git failed it may have been because the packfile
actually exists and is readable, but some sort of verification
did not pass. In this case open_packed_git left pack_fd filled
in, as the file descriptor is valid. We don't want to leak the
file descriptor, nor do we want to allow someone in the future
to use this packed_git.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |