diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index f4f9373f26ea..7ec68a126d5c 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -619,8 +619,10 @@ audit_arg_file(struct proc *p, struct file *fp) so = (struct socket *)fp->f_data; SOCK_LOCK(so); if (INP_CHECK_SOCKAF(so, PF_INET)) { - if (so->so_pcb == NULL) + if (so->so_pcb == NULL) { + SOCK_UNLOCK(so); return; + } ar->k_ar.ar_arg_sockinfo.so_type = so->so_type; ar->k_ar.ar_arg_sockinfo.so_domain = @@ -645,7 +647,6 @@ audit_arg_file(struct proc *p, struct file *fp) /* XXXAUDIT: else? */ break; } - } /*