diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-11-13 21:17:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-13 21:17:16 +0200 |
| commit | 04a587f4809e9c82a5f01dfb8b61f3430b45c69b (patch) | |
| tree | 972d078bc2cef1af065f02787dcb6b4400feef21 /sharpd/sharp_zebra.c | |
| parent | c62c0181f07241fa3beb0a3aec3c39401ed8e5c7 (diff) | |
| parent | 3edeaa906660c60d2ecfc3f9f107f420bfacdf30 (diff) | |
Merge pull request #14781 from donaldsharp/frr_memory_leaks_cleanup
Frr memory leaks cleanup
Diffstat (limited to 'sharpd/sharp_zebra.c')
| -rw-r--r-- | sharpd/sharp_zebra.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sharpd/sharp_zebra.c b/sharpd/sharp_zebra.c index 30bf4f30e1..fde9f9f544 100644 --- a/sharpd/sharp_zebra.c +++ b/sharpd/sharp_zebra.c @@ -1089,3 +1089,17 @@ void sharp_zebra_init(void) zclient->zebra_connected = zebra_connected; zclient->zebra_buffer_write_ready = sharp_zclient_buffer_ready; } + +void sharp_zebra_terminate(void) +{ + struct sharp_zclient *node = sharp_clients_head; + + while (node) { + sharp_zclient_delete(node->client->session_id); + + node = sharp_clients_head; + } + + zclient_stop(zclient); + zclient_free(zclient); +} |
