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 /ripd/rip_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 'ripd/rip_cli.c')
| -rw-r--r-- | ripd/rip_cli.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ripd/rip_cli.c b/ripd/rip_cli.c index 5c26c0cef7..7e2394f473 100644 --- a/ripd/rip_cli.c +++ b/ripd/rip_cli.c @@ -1001,6 +1001,7 @@ DEFPY (clear_ip_rip, VRF_CMD_HELP_STR) { struct list *input; + int ret; input = list_new(); if (vrf) { @@ -1011,7 +1012,11 @@ DEFPY (clear_ip_rip, 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) |
