From 4623d1041dd34d73aeab4b51002fc9ca6d543415 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 1 Aug 2013 01:32:30 +0000 Subject: [PATCH] xfsprogs: free bp in xlog_find_zeroed() error path xlog_find_zeroed() currently leaks a bp on one error path. Using the bp_err: target resolves this. Found by Coverity. Signed-off-by: Eric Sandeen Reviewed-by: Mark Tinguely --- libxlog/xfs_log_recover.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index 7f5a41c67..4093ddcf4 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -937,7 +937,8 @@ xlog_find_zeroed( */ xfs_warn(log->l_mp, "Log inconsistent or not a log (last==0, first!=1)"); - return XFS_ERROR(EINVAL); + error = XFS_ERROR(EINVAL); + goto bp_err; } /* we have a partially zeroed log */ -- 2.47.2