]> www.infradead.org Git - linux.git/commitdiff
xfs: fix a memory leak
authorDarrick J. Wong <djwong@kernel.org>
Wed, 24 Jul 2024 05:11:55 +0000 (22:11 -0700)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 29 Jul 2024 03:55:01 +0000 (09:25 +0530)
kmemleak reported that we don't free the parent pointer names here if we
found corruption.

Fixes: 0d29a20fbdba8 ("xfs: scrub parent pointers")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/scrub/parent.c

index 733c410a22797a91c3d2395677332667dc9496e3..91e7b51ce0680bc891206255afd4fe20f5f78739 100644 (file)
@@ -799,7 +799,7 @@ xchk_parent_pptr(
        }
 
        if (pp->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
-               goto out_pp;
+               goto out_names;
 
        /*
         * Complain if the number of parent pointers doesn't match the link