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

Commit 050a1952 authored by Eric Sandeen's avatar Eric Sandeen Committed by Ben Myers
Browse files

xfs:free bp in xlog_find_tail() error path



xlog_find_tail() currently leaks a bp on one error path.

There is no error target, so manually free the bp before
returning the error.

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 5d0a6549
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -964,6 +964,7 @@ xlog_find_tail(
	}
	}
	if (!found) {
	if (!found) {
		xfs_warn(log->l_mp, "%s: couldn't find sync record", __func__);
		xfs_warn(log->l_mp, "%s: couldn't find sync record", __func__);
		xlog_put_bp(bp);
		ASSERT(0);
		ASSERT(0);
		return XFS_ERROR(EIO);
		return XFS_ERROR(EIO);
	}
	}