diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2008-10-26 15:53:17 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2008-10-26 15:53:17 +0000 |
commit | 9442cd1890c076c6fcb95735caac32cc5e87128f (patch) | |
tree | 8b2244d22c472f1fc167a3031ab881cad0274342 | |
parent | 4aa40c635439d8b9f80e10425314254ce9a700a0 (diff) |
Plug mbuf leak in RPC record error case.
ok thib@
-rw-r--r-- | sys/nfs/nfs_socket.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 2981735e5cc..ae2759ef7fa 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.68 2008/09/12 15:41:40 thib Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.69 2008/10/26 15:53:16 blambert Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -1860,7 +1860,10 @@ nfsrv_dorec(slp, nfsd, ndp) nd->nd_dpos = mtod(m, caddr_t); error = nfs_getreq(nd, nfsd, TRUE); if (error) { - m_freem(nam); + if (nd->nd_nam2) + m_freem(nd->nd_nam2); + if (nd->nd_mrep) + m_freem(nd->nd_mrep); free(nd, M_NFSRVDESC); return (error); } |