HomeFreeBSD

Fix a memory leak introduced in r328426.

Description

Fix a memory leak introduced in r328426.

ffs_sbget() may return a superblock buffer even if it fails, so the
caller must be prepared to free it in this case. Moreover, when tasting
alternate superblock locations in a loop, ffs_sbget()'s readfunc
callback must free the previously allocated buffer.

Reported and tested by: pho
Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D14390

Details

Provenance
markjAuthored on
Reviewer
kib
Differential Revision
D14390: Fix a memory leak introduced in r328426.
Parents
rS329374: Use the conventional name for an array of pages.
Branches
Unknown
Tags
Unknown