diff --git a/ge/common/helper/model_cache_helper.cc b/ge/common/helper/model_cache_helper.cc index 9cd88ef1..0e6c6329 100755 --- a/ge/common/helper/model_cache_helper.cc +++ b/ge/common/helper/model_cache_helper.cc @@ -1679,6 +1679,13 @@ Status ModelCacheHelper::LoadOmModelFromCache(GeModelPtr &ge_model) const { GELOGW("LoadOmModelFromCache: Load model from file failed. ret = %u", ret); return ret; } + std::function callback = [&]() { + if (model_data.model_data != nullptr) { + delete[] reinterpret_cast(model_data.model_data); + model_data.model_data = nullptr; + } + }; + GE_MAKE_GUARD(release, callback); ModelHelper model_helper; ret = model_helper.LoadModel(model_data); diff --git a/ge/hybrid/node_executor/hccl/hccl_node_executor.cc b/ge/hybrid/node_executor/hccl/hccl_node_executor.cc index 7672a1e3..0412e06d 100644 --- a/ge/hybrid/node_executor/hccl/hccl_node_executor.cc +++ b/ge/hybrid/node_executor/hccl/hccl_node_executor.cc @@ -445,6 +445,7 @@ Status AllToAllNodeTask::ExecuteAsync(TaskContext &context, std::function