From 559974e0bdc326eacd67fbd94e77fe57c1dca552 Mon Sep 17 00:00:00 2001 From: ling Date: Sat, 27 Nov 2021 16:14:58 +0800 Subject: [PATCH] [MSLITE] create lite session failed bug --- mindspore/lite/src/cxx_api/model/model_impl.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/mindspore/lite/src/cxx_api/model/model_impl.cc b/mindspore/lite/src/cxx_api/model/model_impl.cc index 7b2688ac6ff..58da64ebdda 100644 --- a/mindspore/lite/src/cxx_api/model/model_impl.cc +++ b/mindspore/lite/src/cxx_api/model/model_impl.cc @@ -556,6 +556,7 @@ session::LiteSession *ModelImpl::CreateLiteSession(lite::InnerContext *context) auto session = new (std::nothrow) lite::LiteSession(); if (session == nullptr) { MS_LOG(ERROR) << "create session failed"; + delete context; return nullptr; }