diff options
author | dfr <dfr@FreeBSD.org> | 1998-11-13 09:44:12 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-11-13 09:44:12 +0000 |
commit | f8c57dfec25a155e314599fc9821cce5f41f7109 (patch) | |
tree | 1bcf74a0f4c0a6dad435975e7f3dfbdddf01fba3 /sys/nfs | |
parent | bd083c1ec43e077fa66c511d033cb92e573b3a57 (diff) | |
download | FreeBSD-src-f8c57dfec25a155e314599fc9821cce5f41f7109.zip FreeBSD-src-f8c57dfec25a155e314599fc9821cce5f41f7109.tar.gz |
Fix a panic in nfsrv_dorec() where a NULL pointer could be passed to
free() sometimes.
Reviewed by: Eric Haug <ejh@eas.slu.edu>
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 11ac518..8327856 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.45 1998/09/07 05:42:15 bde Exp $ + * $Id: nfs_socket.c,v 1.46 1998/09/29 22:33:05 mckusick Exp $ */ /* @@ -2232,7 +2232,9 @@ nfsrv_dorec(slp, nfsd, ndp) nd->nd_dpos = mtod(m, caddr_t); error = nfs_getreq(nd, nfsd, TRUE); if (error) { - FREE(nam, M_SONAME); + if (nam) { + FREE(nam, M_SONAME); + } free((caddr_t)nd, M_NFSRVDESC); return (error); } |