summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 00317f1..0a69769 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -612,8 +612,7 @@ mdsetcred(struct md_s *sc, struct ucred *cred)
if (sc->cred)
crfree(sc->cred);
- crhold(cred);
- sc->cred = cred;
+ sc->cred = crhold(cred);
/*
* Horrible kludge to establish credentials for NFS XXX.
OpenPOWER on IntegriCloud