mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
parent
5d0a654974
commit
050a1952c3
@ -964,6 +964,7 @@ xlog_find_tail(
|
||||
}
|
||||
if (!found) {
|
||||
xfs_warn(log->l_mp, "%s: couldn't find sync record", __func__);
|
||||
xlog_put_bp(bp);
|
||||
ASSERT(0);
|
||||
return XFS_ERROR(EIO);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user