summaryrefslogtreecommitdiffstats
path: root/ripngd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-12-13 00:48:04 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-12-13 00:48:04 +0100
commit0783b36d0eb68ec7dbe74f7498721ec1588eb396 (patch)
treebc20bd06dc2c564718cb6217a632f4cb63113d0f /ripngd
parentMerge pull request #5531 from qlyoung/fix-ospf-ip-hl-trust (diff)
downloadfrr-0783b36d0eb68ec7dbe74f7498721ec1588eb396.tar.xz
frr-0783b36d0eb68ec7dbe74f7498721ec1588eb396.zip
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>
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_cli.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c
index 2d9930e35..b3d92fb0d 100644
--- a/ripngd/ripng_cli.c
+++ b/ripngd/ripng_cli.c
@@ -485,6 +485,7 @@ DEFPY (clear_ipv6_rip,
VRF_CMD_HELP_STR)
{
struct list *input;
+ int ret;
input = list_new();
if (vrf) {
@@ -495,7 +496,11 @@ DEFPY (clear_ipv6_rip,
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)