From 094f1e99348bdcea46f62f5c0f0e9944ed698b4e Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 5 Dec 2010 09:03:31 +1100 Subject: [PATCH] - djm@cvs.openbsd.org 2010/12/04 13:31:37 [hostfile.c] fix fd leak; spotted and ok dtucker --- ChangeLog | 3 +++ hostfile.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4e60f137f..fb23d52b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,9 @@ behaviour of creating a symlink is available using its "-s" option or through the preexisting "symlink" command; based on a patch from miklos AT szeredi.hu in bz#1555; ok markus@ + - djm@cvs.openbsd.org 2010/12/04 13:31:37 + [hostfile.c] + fix fd leak; spotted and ok dtucker 20101204 - (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range) diff --git a/hostfile.c b/hostfile.c index 9145529cb..b6f924b23 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.49 2010/11/29 23:45:51 djm Exp $ */ +/* $OpenBSD: hostfile.c,v 1.50 2010/12/04 13:31:37 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -317,6 +317,7 @@ load_hostkeys(struct hostkeys *hostkeys, const char *host, const char *path) num_loaded++; } debug3("%s: loaded %lu keys", __func__, num_loaded); + fclose(f); return; }