Fix a memory leak in test_inference.cc (#6201)

* Fix a memory leak in test_inference.cc
This commit is contained in:
Changming Sun 2020-12-25 13:02:21 -08:00 committed by GitHub
parent 7347996942
commit 1fc7f92f25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -331,6 +331,7 @@ struct SliceCustomOpKernel {
const OrtValue* input_to = ort_.KernelContext_GetInput(context, 2);
OrtTensorTypeAndShapeInfo* input_X_info = ort_.GetTensorTypeAndShape(input_X);
ONNXTensorElementDataType input_X_type = ort_.GetTensorElementType(input_X_info);
ort_.ReleaseTensorTypeAndShapeInfo(input_X_info);
#if USE_CUDA
int64_t slice_from = 0;
int64_t slice_to = 0;