summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorluoqi <luoqi@FreeBSD.org>1998-09-01 02:31:52 +0000
committerluoqi <luoqi@FreeBSD.org>1998-09-01 02:31:52 +0000
commit6579ddcc262cbfa1cf454516f1b4ebb7119d0113 (patch)
treee6d2b7b56907f9be12e5c60b59663f6d9208faaa /sys/nfsserver
parent9a6b0ba36d96579ea1310c28726be4873c5c4d11 (diff)
downloadFreeBSD-src-6579ddcc262cbfa1cf454516f1b4ebb7119d0113.zip
FreeBSD-src-6579ddcc262cbfa1cf454516f1b4ebb7119d0113.tar.gz
Check for NULL pointer before freeing a struct sockaddr. m_freem() can handle
NULL, buf free() can't.
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_syscalls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfsserver/nfs_syscalls.c b/sys/nfsserver/nfs_syscalls.c
index c6b92d5..abf3383 100644
--- a/sys/nfsserver/nfs_syscalls.c
+++ b/sys/nfsserver/nfs_syscalls.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
- * $Id: nfs_syscalls.c,v 1.41 1998/05/31 20:08:55 peter Exp $
+ * $Id: nfs_syscalls.c,v 1.42 1998/08/23 03:07:16 wollman Exp $
*/
#include <sys/param.h>
@@ -721,7 +721,8 @@ nfssvc_nfsd(nsd, argp, p)
if (nfsrtton)
nfsd_rt(sotype, nd, cacherep);
m_freem(nd->nd_mrep);
- FREE(nd->nd_nam2, M_SONAME);
+ if (nd->nd_nam2)
+ FREE(nd->nd_nam2, M_SONAME);
break;
};
if (nd) {
OpenPOWER on IntegriCloud