From: deraadt Date: Fri, 18 Apr 1997 10:09:46 +0000 (+0000) Subject: Don't set sillyrename field to 0 for directories, as it's in a union with X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=47f13297a51e4f53ae4cabdde17d24059ab7b374;p=openbsd Don't set sillyrename field to 0 for directories, as it's in a union with the head of the cookie list. Fixes PR 3215, fix supplied by Hiroshi Tezuka . Should also fix M_NFSDIROFF memory leak; fvdl --- diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 86806056906..27c551880d4 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.6 1996/04/21 22:30:19 deraadt Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.7 1997/04/18 10:09:46 deraadt Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -174,11 +174,11 @@ nfs_inactive(v) np = VTONFS(ap->a_vp); if (prtactive && ap->a_vp->v_usecount != 0) vprint("nfs_inactive: pushing active", ap->a_vp); - if (ap->a_vp->v_type != VDIR) + if (ap->a_vp->v_type != VDIR) { sp = np->n_sillyrename; - else + np->n_sillyrename = (struct sillyrename *)0; + } else sp = (struct sillyrename *)0; - np->n_sillyrename = (struct sillyrename *)0; if (sp) { /* * Remove the silly file that was rename'd earlier