From acd193d7816dd605086be131658f784274e3bec2 Mon Sep 17 00:00:00 2001 From: mvs Date: Tue, 19 Jan 2021 19:35:59 +0000 Subject: [PATCH] nfs/nfs_boot.c: convert ifunit() to if_unit(9) ok dlg@ --- sys/nfs/nfs_boot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/nfs/nfs_boot.c b/sys/nfs/nfs_boot.c index 22d4f585d36..7d29093e4d7 100644 --- a/sys/nfs/nfs_boot.c +++ b/sys/nfs/nfs_boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_boot.c,v 1.46 2020/08/24 10:02:07 mvs Exp $ */ +/* $OpenBSD: nfs_boot.c,v 1.47 2021/01/19 19:35:59 mvs Exp $ */ /* $NetBSD: nfs_boot.c,v 1.26 1996/05/07 02:51:25 thorpej Exp $ */ /* @@ -136,7 +136,7 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp) /* * Find a network interface. */ - if (nfsbootdevname == NULL || (ifp = ifunit(nfsbootdevname)) == NULL) + if (nfsbootdevname == NULL || (ifp = if_unit(nfsbootdevname)) == NULL) panic("nfs_boot: no suitable interface"); bcopy(ifp->if_xname, ireq.ifr_name, IFNAMSIZ); @@ -190,6 +190,7 @@ nfs_boot_init(struct nfs_diskless *nd, struct proc *procp) } if (ifa == NULL) panic("nfs_boot: address not configured on %s", ifp->if_xname); + if_put(ifp); /* * Get client name and gateway address. -- 2.20.1