mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Does not leak fp. While here remove bogus cast of fp->f_data.
MFC after: 1 week
This commit is contained in:
parent
fc4b98fb88
commit
91f514e413
1 changed files with 5 additions and 2 deletions
|
|
@ -803,9 +803,12 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
|
|||
error1 = getsock_cap(td, s, &rights, &fp, NULL);
|
||||
if (error1 != 0)
|
||||
return (error1);
|
||||
so = (struct socket *)fp->f_data;
|
||||
if (so->so_type == SOCK_DGRAM)
|
||||
so = fp->f_data;
|
||||
if (so->so_type == SOCK_DGRAM) {
|
||||
fdrop(fp, td);
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
fdrop(fp, td);
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue