[ov_subgraphs_dumper_tests] Fix memory leaks (#24751)

### Details:
 - *item1*
 - *...*

### Tickets:
 - *CVS-134419*
This commit is contained in:
Sofya Balandina 2024-05-29 18:16:34 +01:00 committed by GitHub
parent cfb5d4ee84
commit bcd96048b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,8 @@ bool SingleOpMatcher::match_inputs(const std::shared_ptr<ov::Node> &node,
if (node->get_input_size() != ref->get_input_size()) {
return false;
}
const std::vector<size_t> &ignored_ports = get_config(node)->ignored_ports;
const auto &cfg = get_config(node);
const std::vector<size_t> &ignored_ports = cfg->ignored_ports;
for (size_t port_id = 0; port_id < node->get_input_size(); ++port_id) {
if (std::find(ignored_ports.begin(), ignored_ports.end(), port_id) != ignored_ports.end()) {

View File

@ -213,7 +213,7 @@ RepeatPatternExtractor::get_patterns_by_nodes(const std::vector<size_t>& start_o
});
// exclude not repeated pattern
while (potential_patterns.rbegin()->size() < 2 && !potential_patterns.empty()) {
while (!potential_patterns.empty() && potential_patterns.rbegin()->size() < 2) {
potential_patterns.pop_back();
}
patterns = potential_patterns;