diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-07-31 20:32:30 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-13 15:48:51 -0500 |
commit | 5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a (patch) | |
tree | e6d26c956a88bf1c9197257bc0d40f7aebcdc516 /fs | |
parent | 6dd93e9e5eb19e81a74b3df8426a945a08ad8a1f (diff) | |
download | blackbird-obmc-linux-5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a.tar.gz blackbird-obmc-linux-5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a.zip |
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')
-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 217e7fba734b..46710d94c649 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 */ |