summaryrefslogtreecommitdiff
path: root/hostfile.c
diff options
context:
space:
mode:
authordjm <djm>2006-03-26 02:52:20 +0000
committerdjm <djm>2006-03-26 02:52:20 +0000
commit8bd43bd4ab13ca07ba7bb60a8da2509cd4d2aaae (patch)
treea3a3bf6893d20fce0edcb98c22521766af6b04e6 /hostfile.c
parent8258fc619a7bd92ba10f635bb62946bcf65ea1e9 (diff)
downloadopenssh-8bd43bd4ab13ca07ba7bb60a8da2509cd4d2aaae.tar.gz
- djm@cvs.openbsd.org 2006/03/19 02:23:26
[hostfile.c] FILE* leak detected by Coverity via elad AT netbsd.org; ok deraadt@
Diffstat (limited to 'hostfile.c')
-rw-r--r--hostfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hostfile.c b/hostfile.c
index 85fbcf7c..c8057844 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -253,8 +253,10 @@ check_host_in_hostfile_by_key_or_type(const char *filename,
if (key == NULL) {
/* we found a key of the requested type */
- if (found->type == keytype)
+ if (found->type == keytype) {
+ fclose(f);
return HOST_FOUND;
+ }
continue;
}