From cec517636d02b4dfff04a66d9ab20c655196987b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 19 Mar 2006 02:23:27 +0000 Subject: FILE* leak detected by Coverity via elad AT netbsd.org; ok deraadt@ --- usr.bin/ssh/hostfile.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh/hostfile.c') diff --git a/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c index 5cb55dd3c7b..59d072f6b9b 100644 --- a/usr.bin/ssh/hostfile.c +++ b/usr.bin/ssh/hostfile.c @@ -36,7 +36,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: hostfile.c,v 1.37 2006/02/07 03:47:05 stevesk Exp $"); +RCSID("$OpenBSD: hostfile.c,v 1.38 2006/03/19 02:23:26 djm Exp $"); #include @@ -254,8 +254,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.3