]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/nfs/nfs_socket.c
xnu-792.21.3.tar.gz
[apple/xnu.git] / bsd / nfs / nfs_socket.c
index 1f4fda19e576592c72b2d928476a4e13f2409682..f0ca1838efbb8125ccda5acb4d25857a3b2248e1 100644 (file)
@@ -316,6 +316,7 @@ nfs_bind_resv_nopriv(struct nfsmount *nmp)
        if (nfs_bind_resv_thread_state < NFS_BIND_RESV_THREAD_STATE_RUNNING) {
                if (nfs_bind_resv_thread_state < NFS_BIND_RESV_THREAD_STATE_INITTED) {
                        nfs_bind_resv_lck_grp_attr = lck_grp_attr_alloc_init();
+                       lck_grp_attr_setstat(nfs_bind_resv_lck_grp_attr);
                        nfs_bind_resv_lck_grp = lck_grp_alloc_init("nfs_bind_resv", nfs_bind_resv_lck_grp_attr);
                        nfs_bind_resv_lck_attr = lck_attr_alloc_init();
                        nfs_bind_resv_mutex = lck_mtx_alloc_init(nfs_bind_resv_lck_grp, nfs_bind_resv_lck_attr);
@@ -2745,8 +2746,8 @@ nfs_getreq(nd, nfsd, has_header)
        nd->nd_dpos = dpos;
        return (0);
 nfsmout:
-       if (IS_VALID_CRED(nd->nd_cr))
-               kauth_cred_unref(&nd->nd_cr);
+       if (nd->nd_cr)
+               kauth_cred_rele(nd->nd_cr);
        return (error);
 }