diff options
author | pfg <pfg@FreeBSD.org> | 2015-04-24 02:14:01 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-04-24 02:14:01 +0000 |
commit | 34a6863b39a99d08243274e29a700a73e362a37a (patch) | |
tree | 24840ed584f5056abafb20c6a01fb1a99d1cc249 /sys/fs/nfsclient/nfs_clrpcops.c | |
parent | 8ace1d30e5c5eb20aceee6e1ea4805106334e78b (diff) | |
download | FreeBSD-src-34a6863b39a99d08243274e29a700a73e362a37a.zip FreeBSD-src-34a6863b39a99d08243274e29a700a73e362a37a.tar.gz |
MFC r281756:
nfsrpc_createv4: fix double free.
Reported by: Oliver Pinter, clang static checker
Obtained from: HardenedBSD (63cac77c42c0c3fc67da62f97d5ab651d52ae707)
Reviewed by: rmacklem
Diffstat (limited to 'sys/fs/nfsclient/nfs_clrpcops.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clrpcops.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index e1bfa29..8a83802 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) |