diff --git a/frameworks/native/neural_network_runtime/nncompiled_cache.cpp b/frameworks/native/neural_network_runtime/nncompiled_cache.cpp index effcab5ad5360e739bc82cafab988521f3b5c48f..3c3383354d763973099254fb77d19c6b41b21c9c 100644 --- a/frameworks/native/neural_network_runtime/nncompiled_cache.cpp +++ b/frameworks/native/neural_network_runtime/nncompiled_cache.cpp @@ -131,6 +131,7 @@ OH_NN_ReturnCode NNCompiledCache::Restore(const std::string& cacheDir, cacheInfo.modelCheckSum[i]) { LOGE("[NNCompiledCache] Restore failed, the cache model file %{public}s has been changed.", cacheModelPath.c_str()); + munmap(modelBuffer.data, modelBuffer.length); close(modelBuffer.fd); return OH_NN_INVALID_FILE; }