From 8bd43bd4ab13ca07ba7bb60a8da2509cd4d2aaae Mon Sep 17 00:00:00 2001 From: djm Date: Sun, 26 Mar 2006 02:52:20 +0000 Subject: - djm@cvs.openbsd.org 2006/03/19 02:23:26 [hostfile.c] FILE* leak detected by Coverity via elad AT netbsd.org; ok deraadt@ --- hostfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hostfile.c') 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; } -- cgit v1.2.1