Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d0a6549 authored by Eric Sandeen's avatar Eric Sandeen Committed by Ben Myers
Browse files

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: default avatarEric Sandeen <sandeen@redhat.com>
Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 6dd93e9e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 */