diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-07-31 21:32:30 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-13 16:48:51 -0400 |
commit | 5d0a654974c5cac03ce7c577bcfd6bca0f2b2c5a (patch) | |
tree | e6d26c956a88bf1c9197257bc0d40f7aebcdc516 | |
parent | 6dd93e9e5eb19e81a74b3df8426a945a08ad8a1f (diff) |
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 217e7fba734b..46710d94c649 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1145,7 +1145,8 @@ xlog_find_zeroed( | |||
1145 | */ | 1145 | */ |
1146 | xfs_warn(log->l_mp, | 1146 | xfs_warn(log->l_mp, |
1147 | "Log inconsistent or not a log (last==0, first!=1)"); | 1147 | "Log inconsistent or not a log (last==0, first!=1)"); |
1148 | return XFS_ERROR(EINVAL); | 1148 | error = XFS_ERROR(EINVAL); |
1149 | goto bp_err; | ||
1149 | } | 1150 | } |
1150 | 1151 | ||
1151 | /* we have a partially zeroed log */ | 1152 | /* we have a partially zeroed log */ |