Skip to contentSkip to conversation

xfs: fix a memory leak

PATCH In review Darrick J. Wong 2 participants 2 messages Jul 24, 2024 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: fix a memory leak

From: Darrick J. Wong <[email protected]>

kmemleak reported that we don't free the parent pointer names here if we found corruption.

Fixes 0d29a20fbdba8 ("xfs: scrub parent pointers")
---
 fs/xfs/scrub/parent.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/scrub/parent.c +1 -1
index 9de1483b04d6d..3b692c4acc1e6 100644
@@ -821,7 +821,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