]> andersk Git - openssh.git/blobdiff - hostfile.c
- stevesk@cvs.openbsd.org 2006/08/01 23:36:12
[openssh.git] / hostfile.c
index 5cb55dd3c7b61f861ee6e8c112aa1ca814b43656..7ac69e7765cf764e949c05ffa7dda161c7e307d2 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenBSD: hostfile.c,v 1.44 2006/08/01 23:22:47 stevesk Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: hostfile.c,v 1.37 2006/02/07 03:47:05 stevesk Exp $");
 
-#include <resolv.h>
+#include <sys/types.h>
+
+#include <netinet/in.h>
 
 #include <openssl/hmac.h>
 #include <openssl/sha.h>
 
+#include <resolv.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 #include "match.h"
 #include "key.h"
 #include "hostfile.h"
@@ -254,8 +261,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;
                }
 
This page took 0.031786 seconds and 4 git commands to generate.