summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-10-09 16:48:57 +0000
committerjhb <jhb@FreeBSD.org>2001-10-09 16:48:57 +0000
commitdaacd5aa55a401e45aa9e87238c55f17e3902010 (patch)
treeebe7e9c0db14f78bf51e4bfe33fa4d18126e399e /sys/nfsclient
parent9a738c4dbef8eda9ade98ea160b9b5fa2a8e1b20 (diff)
downloadFreeBSD-src-daacd5aa55a401e45aa9e87238c55f17e3902010.zip
FreeBSD-src-daacd5aa55a401e45aa9e87238c55f17e3902010.tar.gz
Use crhold() instead of crdup() since we aren't modifying the cred but
just need to ensure it remains immutable.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 60a1cc9..ed57143 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2361,7 +2361,8 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
#endif
MALLOC(sp, struct sillyrename *, sizeof (struct sillyrename),
M_NFSREQ, M_WAITOK);
- sp->s_cred = crdup(cnp->cn_cred);
+ crhold(cnp->cn_cred);
+ sp->s_cred = cnp->cn_cred;
sp->s_dvp = dvp;
VREF(dvp);
OpenPOWER on IntegriCloud