From 41b465faa0bc6bd15df95a8fac80464084e695a5 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 23 May 2018 16:30:47 -0500 Subject: [PATCH] xfs_repair: don't leak buffer on xattr remote buf verifier error If we try to read an xattr remote buffer and hit a verifier error, release the buffer instead of leaking it. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- repair/attr_repair.c | 1 + 1 file changed, 1 insertion(+) diff --git a/repair/attr_repair.c b/repair/attr_repair.c index 67bb41ec1..f2579fcb5 100644 --- a/repair/attr_repair.c +++ b/repair/attr_repair.c @@ -433,6 +433,7 @@ rmtval_get(xfs_mount_t *mp, xfs_ino_t ino, blkmap_t *blkmap, if (bp->b_error == -EFSBADCRC || bp->b_error == -EFSCORRUPTED) { do_warn( _("Corrupt remote block for attributes of inode %" PRIu64 "\n"), ino); + libxfs_putbuf(bp); clearit = 1; break; } -- 2.47.2