freebsd32_getrusage(2): skip freebsd32_rusage_out on error
PR: 230153 Reported by: kib MFC after: 2 weeks X-MFC-With: 336871 Differential Revision: https://reviews.freebsd.org/D16500
This commit is contained in:
parent
f537dbc2c9
commit
0bdfcd97cb
@ -883,9 +883,10 @@ freebsd32_getrusage(struct thread *td, struct freebsd32_getrusage_args *uap)
|
||||
int error;
|
||||
|
||||
error = kern_getrusage(td, uap->who, &s);
|
||||
freebsd32_rusage_out(&s, &s32);
|
||||
if (error == 0)
|
||||
if (error == 0) {
|
||||
freebsd32_rusage_out(&s, &s32);
|
||||
error = copyout(&s32, uap->rusage, sizeof(s32));
|
||||
}
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user