soo_stat: Ensure error is always initialized.
In kernels without MAC, error is not set for sockets whose protocol layer does not implement the pr_sense hook. Reported by: Jenkins (powerpc kernel builds) Fixes: 7c04ca1fad67 sockets: for stat(2) on a socket don't report hiwat as block size
This commit is contained in:
parent
74704a26bc
commit
e3885a7893
@ -303,7 +303,7 @@ static int
|
||||
soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred)
|
||||
{
|
||||
struct socket *so = fp->f_data;
|
||||
int error;
|
||||
int error = 0;
|
||||
|
||||
bzero((caddr_t)ub, sizeof (*ub));
|
||||
ub->st_mode = S_IFSOCK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user