Index: sys/security/audit/audit_bsm_klib.c =================================================================== --- sys/security/audit/audit_bsm_klib.c +++ sys/security/audit/audit_bsm_klib.c @@ -437,7 +437,17 @@ vp = rdir; else vp = cdir; - MPASS(vp != NULL); + + /* + * rdir must not be NULL, but it may be that cdir failed to resolve in + * the caller. + */ + MPASS(*path != '/' || vp != NULL); + if (vp == NULL) { + cpath[0] = '\0'; + return; + } + /* * NB: We require that the supplied array be at least MAXPATHLEN bytes * long. If this is not the case, then we can run into serious trouble.