summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-07-31 20:32:30 -0500
committerBen Myers <bpm@sgi.com>2013-08-13 15:48:51 -0500
commit5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a (patch)
treee6d26c956a88bf1c9197257bc0d40f7aebcdc516 /fs/xfs/xfs_log_recover.c
parent6dd93e9e5eb19e81a74b3df8426a945a08ad8a1f (diff)
downloadop-kernel-dev-5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a.zip
op-kernel-dev-5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a.tar.gz
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 <sandeen@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c3
1 files changed, 2 insertions, 1 deletions
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 */
OpenPOWER on IntegriCloud