ffs_sbget() may return a superblock buffer even if it fails. Moreover,
readfunc returns a dynamically allocated buffer, when we call it on
backup superblocks, we need to free the previously allocated buffer.
Also fix what I believe is a free() of an uninitialized pointer if the
ffs_sbget() call in ffs_mountfs() fails before "fs" is set.
Details
Details
- Reviewers
mckusick kib - Commits
- rS329375: Fix a memory leak introduced in r328426.
pho reported finding the leak while testing gmirror, tracked it down
to the aforementioned revision, and tested an earlier version of this
diff.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable