Skip to content

Commit b5e9821

Browse files
obdevob-robot
authored andcommitted
[CP] Fix: release HNSW scan iter and free alloc on error path in create_vec_hnsw_lookup_tree
1 parent 31cfdab commit b5e9821

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/sql/das/iter/ob_das_iter_utils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4206,6 +4206,12 @@ int ObDASIterUtils::create_vec_hnsw_lookup_tree(ObTableScanParam &scan_param,
42064206
LOG_WARN("failed to create local lookup iter", K(ret));
42074207
}
42084208
}
4209+
4210+
if (OB_FAIL(ret) && OB_NOT_NULL(hnsw_scan_iter)) {
4211+
hnsw_scan_iter->release();
4212+
alloc.free(hnsw_scan_iter);
4213+
hnsw_scan_iter = nullptr;
4214+
}
42094215
}
42104216

42114217
return ret;

0 commit comments

Comments
 (0)