mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
Fix use-after-free introduced in r234036.
Reviewed by: mckusick Tested by: pho
This commit is contained in:
parent
86dc3a9ae2
commit
72b8ff1c74
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234537
@ -699,10 +699,14 @@ ffs_reload(struct mount *mp, struct thread *td)
|
|||||||
* We no longer know anything about clusters per cylinder group.
|
* We no longer know anything about clusters per cylinder group.
|
||||||
*/
|
*/
|
||||||
if (fs->fs_contigsumsize > 0) {
|
if (fs->fs_contigsumsize > 0) {
|
||||||
lp = fs->fs_maxcluster;
|
fs->fs_maxcluster = lp = space;
|
||||||
for (i = 0; i < fs->fs_ncg; i++)
|
for (i = 0; i < fs->fs_ncg; i++)
|
||||||
*lp++ = fs->fs_contigsumsize;
|
*lp++ = fs->fs_contigsumsize;
|
||||||
|
space = lp;
|
||||||
}
|
}
|
||||||
|
size = fs->fs_ncg * sizeof(u_int8_t);
|
||||||
|
fs->fs_contigdirs = (u_int8_t *)space;
|
||||||
|
bzero(fs->fs_contigdirs, size);
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
MNT_VNODE_FOREACH_ALL(vp, mp, mvp) {
|
MNT_VNODE_FOREACH_ALL(vp, mp, mvp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user