freebsd32_rusage_out(): bzero the compat32 structure

There is some padding on non-x86.  Unconditionally bzero the memory to
avoid a leak.

Noted by:	markj
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54592
This commit is contained in:
Konstantin Belousov
2026-01-21 16:14:10 +02:00
parent 072af59d46
commit 6af3cf27ed
+1
View File
@@ -203,6 +203,7 @@ void
freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32)
{
bzero(s32, sizeof(*s32));
TV_CP(*s, *s32, ru_utime);
TV_CP(*s, *s32, ru_stime);
CP(*s, *s32, ru_maxrss);