Skip to content

Commit 8dad31f

Browse files
Dan Carpentercmaiolino
authored andcommitted
xfs: fix memory leak in xfs_growfs_check_rtgeom()
Free the "nmp" allocation before returning -EINVAL. Fixes: dc68c0f ("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>
1 parent dc68c0f commit 8dad31f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/xfs/xfs_rtalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ xfs_growfs_check_rtgeom(
12651265
uint32_t rem;
12661266

12671267
if (rextsize != 1)
1268-
return -EINVAL;
1268+
goto out_inval;
12691269
div_u64_rem(nmp->m_sb.sb_rblocks, gblocks, &rem);
12701270
if (rem) {
12711271
xfs_warn(mp,

0 commit comments

Comments
 (0)