X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/a92a0909e5718db781ac21b72e118060b2f28692..991c97285e3a36da05042516af4a15ca30a909af:/hostfile.c diff --git a/hostfile.c b/hostfile.c index 85fbcf7c..2cceb352 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,3 +1,4 @@ +/* $OpenBSD: hostfile.c,v 1.45 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,16 +38,24 @@ #include "includes.h" -#include +#include + +#include #include #include +#include +#include +#include +#include +#include + +#include "xmalloc.h" #include "match.h" #include "key.h" #include "hostfile.h" #include "log.h" -#include "xmalloc.h" static int extract_salt(const char *s, u_int l, char *salt, size_t salt_len) @@ -253,8 +262,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; }