Skip to content

Commit 8f56705

Browse files
authored
Merge pull request #19629 from donaldsharp/bmpe_leaked
bgpd: Free up leaked bpme on release
2 parents c3488a4 + d0df550 commit 8f56705

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bgpd/bgp_pbr.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,9 @@ static void bgp_pbr_flush_iprule(struct bgp *bgp, struct bgp_pbr_action *bpa,
16831683
bgp_pbr_bpa_remove(bpa);
16841684
}
16851685

1686+
/*
1687+
* This function frees the bpme that is passed in
1688+
*/
16861689
static void bgp_pbr_flush_entry(struct bgp *bgp, struct bgp_pbr_action *bpa,
16871690
struct bgp_pbr_match *bpm,
16881691
struct bgp_pbr_match_entry *bpme)
@@ -1730,6 +1733,8 @@ static void bgp_pbr_flush_entry(struct bgp *bgp, struct bgp_pbr_action *bpa,
17301733
* note that drop does not need to call send_pbr_action
17311734
*/
17321735
}
1736+
1737+
bgp_pbr_match_entry_free(bpme);
17331738
bgp_pbr_bpa_remove(bpa);
17341739
}
17351740

0 commit comments

Comments
 (0)