[bugfix] fix doc word iter memleak with new operator

This commit is contained in:
saltonz
2025-03-03 07:15:43 +00:00
committed by ob-robot
parent 0b9a44ab96
commit dde0dac3c6

View File

@ -260,7 +260,7 @@ int ObFTDocWordScanIterator::build_key_range(
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("fail to allocate buffer for rowkey", K(ret));
} else {
common::ObObj *objs= new common::ObObj[ROWKEY_COLUMN_COUNT * 2];
common::ObObj *objs= new (buf) common::ObObj[ROWKEY_COLUMN_COUNT * 2];
objs[0].set_varbinary(doc_id.get_string());
objs[1] = common::ObObj::make_min_obj();
objs[2].set_varbinary(doc_id.get_string());