diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-12 18:48:04 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-12-12 18:48:04 -0500 |
| commit | 0783b36d0eb68ec7dbe74f7498721ec1588eb396 (patch) | |
| tree | bc20bd06dc2c564718cb6217a632f4cb63113d0f /ripngd/ripng_cli.c | |
| parent | 297def9386c73fdb931265f81a6f8a5fd1e415f2 (diff) | |
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/ripng_cli.c')
| -rw-r--r-- | ripngd/ripng_cli.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c index 2d9930e357..b3d92fb0d9 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) |
