xfs: fix memory leak in xfs_growfs_check_rtgeom()
Subsystems (2)
PATCH 1/1 xfs: fix memory leak in xfs_growfs_check_rtgeom()
Free the "nmp" allocation before returning -EINVAL.
Fixes dc68c0f60169 ("xfs: fix the zoned RT growfs check for zone alignment")
Signed-off-by Dan Carpenter <[email protected]>
--- fs/xfs/xfs_rtalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_rtalloc.c +1 -1
@@ -1265,7 +1265,7 @@ xfs_growfs_check_rtgeom(uint32_t rem;if (rextsize !=1 ) -return -EINVAL ; + goto out_inval;div_u64_rem (nmp->m_sb.sb_rblocks, gblocks, &rem);if (rem) { xfs_warn(mp,
Signature · 1 line
2.51.0
Quoted 4 lines · Dan Carpenter
Free the "nmp" allocation before returning
-EINVAL.Fixes dc68c0f60169 ("xfs: fix the zoned RT growfs check for zone alignment")Signed-off-by Dan Carpenter <[email protected]>
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 3 lines · Dan Carpenter
Free the "nmp" allocation before returning
-EINVAL.
Applied to for-next, thanks!
[1/1] xfs: fix memory leak in xfs_growfs_check_rtgeom()
commit: 8dad31f85c7b91fd8bdbc6d0f27abc53bd8b1ffe
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>