[CPU] [Ngraph] Fix of memory leak in PassBase::get_name and leak in jit_avx2_1x1_convolution_with_dw_conv_fwd_t kernel (#10199)

This commit is contained in:
Vladislav Volkov 2022-02-12 15:48:49 +03:00 committed by GitHub
parent 451453c4ce
commit 78281fef74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,8 @@
# include <cxxabi.h>
#endif
#include <memory>
#include "atomic_guard.hpp"
#include "ngraph/pass/pass.hpp"
#include "openvino/pass/manager.hpp"
@ -33,7 +35,10 @@ std::string ov::pass::PassBase::get_name() const {
std::string pass_name = typeid(*p).name();
#ifndef _WIN32
int status;
pass_name = abi::__cxa_demangle(pass_name.c_str(), nullptr, nullptr, &status);
std::unique_ptr<char, void (*)(void*)> demangled_name(
abi::__cxa_demangle(pass_name.c_str(), nullptr, nullptr, &status),
std::free);
pass_name = demangled_name.get();
#endif
return pass_name;
} else {

@ -1 +1 @@
Subproject commit 6107578bcaa7ce729634e58181f30d202861be26
Subproject commit 3a1757db429dadb9f1bfd83597c7cdd80bbb8228