summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2008-10-26 15:53:16 +0000
committerblambert <blambert@openbsd.org>2008-10-26 15:53:16 +0000
commit92bfff9ee93b1b7688b8239a69522f086583ec23 (patch)
tree79978175f182a775642bfc81ea02cc8f3db1b119 /sys/nfs
parentdocument newer clean=build (diff)
downloadwireguard-openbsd-92bfff9ee93b1b7688b8239a69522f086583ec23.tar.xz
wireguard-openbsd-92bfff9ee93b1b7688b8239a69522f086583ec23.zip
Plug mbuf leak in RPC record error case.
ok thib@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_socket.c7
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);
}