diff options
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index a363a5641aed..34b58dcc579e 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -614,8 +614,12 @@ ext2_compute_sb_data(struct vnode *devvp, struct ext2fs *es, fsbtodb(fs, ext2_cg_location(fs, i)), fs->e2fs_bsize, NOCRED, &bp); if (error) { - free(fs->e2fs_contigdirs, M_EXT2MNT); - free(fs->e2fs_gd, M_EXT2MNT); + /* + * fs->e2fs_gd and fs->e2fs_contigdirs + * will be freed later by the caller, + * because this function could be called from + * MNT_UPDATE path. + */ brelse(bp); return (error); } |