修改ebpf 内存泄漏

Signed-off-by: wenlong_12 <wenlong12@huawei.com>
This commit is contained in:
wenlong_12 2024-09-02 11:31:14 +00:00 committed by Gitee
parent 993e6ac9b8
commit c15cefbc60
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -55,8 +55,7 @@ EbpfConverter::EbpfConverter(const std::string& inputPath, const std::string& ou
EbpfConverter::~EbpfConverter()
{
std::map<std::string, SymbolInfo>::iterator iter;
for (iter = symbolInfo_.begin(); iter != symbolInfo_.end(); iter++)
{
for (iter = symbolInfo_.begin(); iter != symbolInfo_.end(); iter++) {
if (iter->second.symTab != nullptr) {
delete[] iter->second.symTab;
iter->second.symTab = nullptr;