HomeFreeBSD

The callers of kern_getfsstat(UIO_SYSSPACE) expect that *buf always

Description

The callers of kern_getfsstat(UIO_SYSSPACE) expect that *buf always
returns memory which must be freed, regardless of the error. Assign
NULL to *buf in case we are not going to allocate any memory due to
invalid mode.

Reported and tested by: pho
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks (together with r310638)
Differential revision: https://reviews.freebsd.org/D9042

Details

Provenance
kibAuthored on
Reviewer
jhb
Differential Revision
D9042: Fix a regression in r310638.
Parents
rS311285: MFV r311279: zlib 1.2.10.
Branches
Unknown
Tags
Unknown