mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 07:03:07 +00:00
ripd, ripngd: Free up list after call into nb_cli_rpc
We have a clear memory leak after running `clear ip rip` Fix this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
297def9386
commit
0783b36d0e
@ -1001,6 +1001,7 @@ DEFPY (clear_ip_rip,
|
|||||||
VRF_CMD_HELP_STR)
|
VRF_CMD_HELP_STR)
|
||||||
{
|
{
|
||||||
struct list *input;
|
struct list *input;
|
||||||
|
int ret;
|
||||||
|
|
||||||
input = list_new();
|
input = list_new();
|
||||||
if (vrf) {
|
if (vrf) {
|
||||||
@ -1011,7 +1012,11 @@ DEFPY (clear_ip_rip,
|
|||||||
listnode_add(input, yang_vrf);
|
listnode_add(input, yang_vrf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nb_cli_rpc("/frr-ripd:clear-rip-route", input, NULL);
|
ret = nb_cli_rpc("/frr-ripd:clear-rip-route", input, NULL);
|
||||||
|
|
||||||
|
list_delete(&input);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rip_cli_init(void)
|
void rip_cli_init(void)
|
||||||
|
@ -485,6 +485,7 @@ DEFPY (clear_ipv6_rip,
|
|||||||
VRF_CMD_HELP_STR)
|
VRF_CMD_HELP_STR)
|
||||||
{
|
{
|
||||||
struct list *input;
|
struct list *input;
|
||||||
|
int ret;
|
||||||
|
|
||||||
input = list_new();
|
input = list_new();
|
||||||
if (vrf) {
|
if (vrf) {
|
||||||
@ -495,7 +496,11 @@ DEFPY (clear_ipv6_rip,
|
|||||||
listnode_add(input, yang_vrf);
|
listnode_add(input, yang_vrf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nb_cli_rpc("/frr-ripngd:clear-ripng-route", input, NULL);
|
ret = nb_cli_rpc("/frr-ripngd:clear-ripng-route", input, NULL);
|
||||||
|
|
||||||
|
list_delete(&input);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ripng_cli_init(void)
|
void ripng_cli_init(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user