From 75b4747701b818a37af0dddca0d175f854e15964 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 27 Nov 2019 15:32:05 -0800 Subject: [PATCH] Fix a memleak in pybind. (#2503) --- onnxruntime/python/onnxruntime_pybind_mlvalue.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/onnxruntime_pybind_mlvalue.cc b/onnxruntime/python/onnxruntime_pybind_mlvalue.cc index 491ca6e105..e2b68e121e 100644 --- a/onnxruntime/python/onnxruntime_pybind_mlvalue.cc +++ b/onnxruntime/python/onnxruntime_pybind_mlvalue.cc @@ -233,7 +233,7 @@ void CreateSequenceOfTensors(AllocatorPtr alloc, const std::string& name_input, throw std::runtime_error("CreateSequenceOfTensors: Input is not a tensor"); } auto p_tensor = CreateTensor(alloc, name_input, reinterpret_cast(py_obj)); - p_seq_tensors->tensors[i] = std::move(*(p_tensor.release())); + p_seq_tensors->tensors[i] = std::move(*p_tensor); } }