diff options
author | Luoqi Chen <luoqi@FreeBSD.org> | 1998-09-01 02:31:52 +0000 |
---|---|---|
committer | Luoqi Chen <luoqi@FreeBSD.org> | 1998-09-01 02:31:52 +0000 |
commit | 4ef872a4c569172a3d2dec2d1aa39dfcf6e4f8a8 (patch) | |
tree | 2af906eb210a5d63768463057eabe2e8d7f4cc5a /sys/nfs | |
parent | aa53a702c9261d4e23e24f2221be49ad0710bee7 (diff) | |
download | src-4ef872a4c569172a3d2dec2d1aa39dfcf6e4f8a8.tar.gz src-4ef872a4c569172a3d2dec2d1aa39dfcf6e4f8a8.zip |
Check for NULL pointer before freeing a struct sockaddr. m_freem() can handle
NULL, buf free() can't.
Notes
Notes:
svn path=/head/; revision=38718
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_syscalls.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfs/nfs_syscalls.c b/sys/nfs/nfs_syscalls.c index c6b92d5f597e..abf3383e709d 100644 --- a/sys/nfs/nfs_syscalls.c +++ b/sys/nfs/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) { |