]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
The callers of kern_getfsstat(UIO_SYSSPACE) expect that *buf always
authorkib <kib@FreeBSD.org>
Wed, 4 Jan 2017 16:09:45 +0000 (16:09 +0000)
committerkib <kib@FreeBSD.org>
Wed, 4 Jan 2017 16:09:45 +0000 (16:09 +0000)
commite1aff3b4576ebd252f489da9ffe2956e1692a92a
tree555a37ac6ca073d9c7e4e62c66980e718c7335cd
parentabe96edd391d74a5245dc7b6058fdb1bc2db8f5b
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
sys/kern/vfs_syscalls.c