]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: fix a memory leak
authorDarrick J. Wong <djwong@kernel.org>
Wed, 24 Jul 2024 04:47:39 +0000 (21:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 31 Jul 2024 01:52:43 +0000 (18:52 -0700)
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>
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