提交 0371b0ef 编写于 作者: O obdev 提交者: wangzelin.wzl

[CP] [xa][fix] avoid use null pointer when fail to alloc memory

上级 e3997a19
......@@ -3506,6 +3506,7 @@ int ObScheTransCtx::save_trans_desc_(const ObTransDesc& trans_desc)
void* ptr = NULL;
if (OB_UNLIKELY(NULL == (ptr = ob_malloc(sizeof(ObTransDesc), "ObScheTransCtx")))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
TRANS_LOG(WARN, "fail to alloc memory", K(ret), K(*this));
} else {
trans_desc_ = new (ptr) ObTransDesc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册