diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2008-10-20 13:40:20 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2008-10-20 13:40:20 +0000 |
commit | 569467f8a4165d7c79811934f7fe899e48bd96cd (patch) | |
tree | 91733bf1826d5a840c786b2d4e9fd016a11b04be /sys/nfs | |
parent | eaebd8142928ba1b0d5fe3a62f964c99fd875888 (diff) |
Be pedantically correct in freeing allocated mbufs, even upon clearing
the server cache on shutdown.
ok thib@
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_srvcache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c index 9edc8cc4e53..26939c5af54 100644 --- a/sys/nfs/nfs_srvcache.c +++ b/sys/nfs/nfs_srvcache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_srvcache.c,v 1.19 2008/07/05 12:45:06 thib Exp $ */ +/* $OpenBSD: nfs_srvcache.c,v 1.20 2008/10/20 13:40:19 blambert Exp $ */ /* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */ /* @@ -291,6 +291,10 @@ nfsrv_cleancache(void) nextrp = TAILQ_NEXT(rp, rc_lru); LIST_REMOVE(rp, rc_hash); TAILQ_REMOVE(&nfsrvlruhead, rp, rc_lru); + if (rp->rc_flag & RC_REPMBUF) + m_freem(rp->rc_reply); + if (rp->rc_flag & RC_NAM) + m_freem(rp->rc_nam); free(rp, M_NFSD); } numnfsrvcache = 0; |