From f392a2616f206f87fdd53338614d46c7f2e175a4 Mon Sep 17 00:00:00 2001 From: glass Date: Tue, 29 Nov 1994 15:03:13 +0000 Subject: [PATCH] bin/595 fixed. reported and fix provided by Chuck Silvers --- usr.sbin/rpc.bootparamd/bootparamd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rpc.bootparamd/bootparamd.c b/usr.sbin/rpc.bootparamd/bootparamd.c index 631901867475..bd8a5e8e739c 100644 --- a/usr.sbin/rpc.bootparamd/bootparamd.c +++ b/usr.sbin/rpc.bootparamd/bootparamd.c @@ -6,7 +6,7 @@ * Various small changes by Theo de Raadt * Parser rewritten (adding YP support) by Roland McGrath * - * $Id: bootparamd.c,v 1.3 1994/01/23 21:55:56 deraadt Exp $ + * $Id: bootparamd.c,v 1.4 1994/11/29 15:03:13 glass Exp $ */ #include @@ -351,8 +351,10 @@ lookup_bootparam(client, client_canonical, id, server, path) strncpy(client_canonical, word, MAX_MACHINE_NAME); /* We have found a line for CLIENT */ - if (id == NULL) + if (id == NULL) { + (void) fclose(f); return 0; + } /* Look for a value for the parameter named by ID */ while ((word = strsep(&bp, " \t\n")) != NULL) {