summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-12-19 13:33:50 +0300
committerCarlos Maiolino <cem@kernel.org>2026-01-09 12:57:27 +0100
commit8dad31f85c7b91fd8bdbc6d0f27abc53bd8b1ffe (patch)
treebac22709a769aa0796869e1701088ff2f723cca4 /fs
parentdc68c0f601691010dd5ae53442f8523f41a53131 (diff)
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 <dan.carpenter@linaro.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_rtalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index e063f4f2f2e6..167298ad88dd 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -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,