When returning early from audit_arg_file() due to so->so_pcb being NULL

(due to an early reset or the like), remember to unlock the socket lock.
This will not occur in 7-CURRENT, but could in theory occur in 6-STABLE.

MFC after:	1 week
This commit is contained in:
Robert Watson 2007-01-06 22:28:28 +00:00
parent 1e11060f37
commit 9da038edfd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165845

View File

@ -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;
}
}
/*