mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-11-02 16:25:18 +00:00
bgpd: When showing a lcommunity free alloced memory
We are temporarily allocing memory to show lcommunity information. We then immediately drop it. Account for that memory properly. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
15675d025d
commit
4f28b2b59e
@ -11206,6 +11206,7 @@ static int bgp_show_lcommunity(struct vty *vty, struct bgp *bgp, int argc,
|
||||
char *str;
|
||||
int first = 0;
|
||||
uint8_t show_flags = 0;
|
||||
int ret;
|
||||
|
||||
if (uj)
|
||||
SET_FLAG(show_flags, BGP_SHOW_OPT_JSON);
|
||||
@ -11233,10 +11234,13 @@ static int bgp_show_lcommunity(struct vty *vty, struct bgp *bgp, int argc,
|
||||
return CMD_WARNING;
|
||||
}
|
||||
|
||||
return bgp_show(vty, bgp, afi, safi,
|
||||
ret = bgp_show(vty, bgp, afi, safi,
|
||||
(exact ? bgp_show_type_lcommunity_exact
|
||||
: bgp_show_type_lcommunity),
|
||||
lcom, show_flags);
|
||||
|
||||
lcommunity_free(&lcom);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int bgp_show_lcommunity_list(struct vty *vty, struct bgp *bgp,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user