[CP] Memory leak about connect by root row

This commit is contained in:
obdev 2023-04-11 12:56:01 +08:00 committed by ob-robot
parent 6306b01265
commit 2b16e9b079

View File

@ -271,6 +271,10 @@ int ObNLConnectByWithIndexOp::calc_connect_by_root_exprs(bool is_root)
}
}
if (OB_SUCC(ret)) {
if (OB_NOT_NULL(connect_by_root_row_)) {
mem_context_->get_malloc_allocator().free(connect_by_root_row_);
connect_by_root_row_ = NULL;
}
if (OB_FAIL(ObStoredDatumRow::build(connect_by_root_row_, spec.connect_by_root_exprs_,
eval_ctx_, mem_context_->get_malloc_allocator()))) {
LOG_WARN("failed to build store row", K(ret));