diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 9666ef393eef..00317f1fd8ba 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -612,7 +612,8 @@ mdsetcred(struct md_s *sc, struct ucred *cred) if (sc->cred) crfree(sc->cred); - sc->cred = crdup(cred); + crhold(cred); + sc->cred = cred; /* * Horrible kludge to establish credentials for NFS XXX.