Skip to content

Commit 56a8c92

Browse files
committed
Merge pull request #639 from RedisAI/fix_leak_in_running_onnx_with_batching
Fix leak in running onnx with batching
1 parent 80984a7 commit 56a8c92

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backends/onnxruntime.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ int RAI_ModelRunORT(RAI_ModelRunCtx **mctxs, RAI_Error *error) {
571571
ONNX_VALIDATE_STATUS(ort->GetDimensionsCount(info, &ndims))
572572
int64_t dims[ndims];
573573
ONNX_VALIDATE_STATUS(ort->GetDimensions(info, dims, ndims))
574+
ort->ReleaseTensorTypeAndShapeInfo(info);
574575
if (dims[0] != total_batch_size) {
575576
RAI_SetError(error, RAI_EMODELRUN,
576577
"ERR Model did not generate the expected batch size");

0 commit comments

Comments
 (0)