提交 5d0a6549 编写于 作者: E Eric Sandeen 提交者: Ben Myers

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: NEric Sandeen <sandeen@redhat.com>
Reviewed-by: NMark Tinguely <tinguely@sgi.com>
Signed-off-by: NBen Myers <bpm@sgi.com>
上级 6dd93e9e
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册