Initialize cap_rights before use.
MFC after: 1 week
This commit is contained in:
parent
bb2f96be46
commit
665056f70d
@ -843,7 +843,8 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
|
||||
if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
|
||||
return (EINVAL);
|
||||
if (error == EINVAL) {
|
||||
error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL);
|
||||
error1 = getsock_cap(td, s,
|
||||
cap_rights_init(&rights, CAP_ACCEPT), &fp, NULL, NULL);
|
||||
if (error1 != 0)
|
||||
return (error1);
|
||||
so = fp->f_data;
|
||||
|
Loading…
Reference in New Issue
Block a user