xfs: fix memory leak in xfs_growfs_check_rtgeom()

Free the "nmp" allocation before returning -EINVAL.

Fixes: dc68c0f601 ("xfs: fix the zoned RT growfs check for zone alignment")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
Dan Carpenter 2025-12-19 13:33:50 +03:00 committed by Carlos Maiolino
parent dc68c0f601
commit 8dad31f85c

View File

@ -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,