Skip to content

Commit

Permalink
[ov_subgraphs_dumper_tests] Fix memory leaks (openvinotoolkit#24751)
Browse files Browse the repository at this point in the history
### Details:
 - *item1*
 - *...*

### Tickets:
 - *CVS-134419*
  • Loading branch information
sbalandi authored May 29, 2024
1 parent cfb5d4e commit bcd9604
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bcd9604

Please sign in to comment.