From: Eric Sandeen Date: Thu, 1 Aug 2013 01:32:30 +0000 (+0000) Subject: xfsprogs: free bp in xlog_find_zeroed() error path X-Git-Tag: v3.2.0-alpha1~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4623d1041dd34d73aeab4b51002fc9ca6d543415;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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 */