From a4080cef33fd7a83fbef816fe4bd0fd807a29196 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 24 Jun 2026 11:17:06 -0700 Subject: [PATCH] xfs_scrub: don't leak the autofsck fsproperty handle Codex notices that we leak the fsproperty handle if the filesystem doesn't actually have the property set. Fix that by moving the free call; it can handle a totally nulled out structure. Cc: linux-xfs@vger.kernel.org # v6.10.0 Fixes: 9451b5ee0d0d2d ("xfs_scrub: allow sysadmin to control background scrubs") Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- scrub/phase1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scrub/phase1.c b/scrub/phase1.c index 6ac59264..620a1239 100644 --- a/scrub/phase1.c +++ b/scrub/phase1.c @@ -178,8 +178,6 @@ mode_from_autofsck( break; } - fsprops_free_handle(&fph); - summarize: switch (ctx->mode) { case SCRUB_MODE_NONE: @@ -200,6 +198,7 @@ summarize: break; } + fsprops_free_handle(&fph); return; no_property: /* -- 2.47.3