From: Eric Sandeen Date: Thu, 1 Aug 2013 01:32:30 +0000 (-0500) Subject: xfs: free bp in xlog_find_zeroed() error path X-Git-Tag: upstream/snapshot3+hdmi~4312^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git xfs: 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 Signed-off-by: Ben Myers --- diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 217e7fb..46710d9 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1145,7 +1145,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 */