From: Darrick J. Wong Date: Wed, 23 May 2018 21:30:47 +0000 (-0500) Subject: xfs_repair: don't leak buffer on xattr remote buf verifier error X-Git-Tag: v4.17.0-rc1~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41b465faa0bc6bd15df95a8fac80464084e695a5;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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; }