Page MenuHomeFreeBSD

Fix a regression in r310638.
ClosedPublic

Authored by kib on Jan 4 2017, 10:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 5, 3:13 PM
Unknown Object (File)
Fri, Oct 3, 10:26 PM
Unknown Object (File)
Aug 21 2025, 9:23 PM
Unknown Object (File)
Aug 14 2025, 1:12 AM
Unknown Object (File)
Aug 8 2025, 9:19 PM
Unknown Object (File)
Aug 2 2025, 6:46 PM
Unknown Object (File)
Jul 16 2025, 2:21 AM
Unknown Object (File)
Jun 28 2025, 2:54 PM
Subscribers

Details

Summary

The callers of kern_getfsstat(UIO_SYSSPACE) expect that *buf always return 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.

Test Plan

Reported and tested by: pho

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib retitled this revision from to Fix a regression in r310638..
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added reviewers: jhb, trasz.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
kib added a subscriber: pho.
jhb edited edge metadata.
This revision is now accepted and ready to land.Jan 4 2017, 3:46 PM
This revision was automatically updated to reflect the committed changes.