to issue<50468640>:fix core when destruct obj which has been copied succ after fail to copy other element

This commit is contained in:
hanr881
2023-06-22 03:54:31 +00:00
committed by ob-robot
parent b2ad3b0072
commit fcb06e0178

View File

@ -1797,7 +1797,7 @@ int ObPLCollection::deep_copy(ObPLCollection *src, ObIAllocator *allocator)
}
// 对于已经copy成功的new obj释放内存
if (OB_FAIL(ret) && OB_NOT_NULL(data)) {
for (int64_t j = 0; j <= i; ++j) {
for (int64_t j = 0; j <= i && j < src->get_count(); ++j) {
int tmp = ObUserDefinedType::destruct_obj(new_objs[j]);
if (OB_SUCCESS != tmp) {
LOG_WARN("fail torelease memory", K(ret), K(tmp));