diff --git a/onnxruntime/core/session/onnxruntime_c_api.cc b/onnxruntime/core/session/onnxruntime_c_api.cc index 36f7f1f60c36e..21d09df5cc4db 100644 --- a/onnxruntime/core/session/onnxruntime_c_api.cc +++ b/onnxruntime/core/session/onnxruntime_c_api.cc @@ -3671,7 +3671,7 @@ OrtStatus* GetInputOutputMemoryInfo(const OrtSession* ort_session, InlinedVector mem_info; ORT_API_RETURN_IF_STATUS_NOT_OK( - session->GetInputOutputMemoryInfo(InferenceSession::SessionInputOutputType::kInput, mem_info)); + session->GetInputOutputMemoryInfo(type, mem_info)); auto num_found = mem_info.size(); if (num_found > num_values) {