diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index e1bfa29d90bb..8a83802a7497 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2153,8 +2153,10 @@ nfsrpc_createv4(vnode_t dvp, char *name, int namelen, struct vattr *vap, (void) nfs_catnap(PZERO, ret, "nfs_crt2"); } while (ret == NFSERR_DELAY); if (ret) { - if (dp != NULL) + if (dp != NULL) { FREE((caddr_t)dp, M_NFSCLDELEG); + dp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER || ret == NFSERR_BADSESSION)