to issue<49381348>:fix serveral memory leak stack

This commit is contained in:
hanr881
2023-06-09 05:23:44 +00:00
committed by ob-robot
parent 8c33711e48
commit a1cc5e29fe
5 changed files with 47 additions and 16 deletions

View File

@ -751,10 +751,16 @@ int ObPLResolver::resolve(const ObStmtNodeTree *parse_tree, ObPLFunctionAST &fun
}
}
}
if (OB_SUCC(ret) && NULL != current_block_ && NULL != stmt) {
if (OB_FAIL(ret)) {
if (NULL != stmt) {
stmt->~ObPLStmt();
}
} else if (NULL != current_block_ && NULL != stmt) {
if (OB_FAIL(current_block_->add_stmt(stmt))) {
LOG_WARN("failed to add stmt", K(stmt), K(ret));
if (NULL != stmt) {
stmt->~ObPLStmt();
}
}
}
}