diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-08-01 01:32:30 (GMT) |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-13 20:48:51 (GMT) |
commit | 5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a (patch) | |
tree | e6d26c956a88bf1c9197257bc0d40f7aebcdc516 | |
parent | 6dd93e9e5eb19e81a74b3df8426a945a08ad8a1f (diff) | |
download | linux-fsl-qoriq-5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a.tar.xz |
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>
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 3 |
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 */ |