From: Darrick J. Wong Date: Wed, 24 Jun 2026 18:17:06 +0000 (-0700) Subject: xfs_scrub: don't leak the autofsck fsproperty handle X-Git-Tag: v7.1.0~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4080cef33fd7a83fbef816fe4bd0fd807a29196;p=xfsprogs-dev.git 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 --- 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: /*