summaryrefslogtreecommitdiff
path: root/zebra/zebra_gr.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-03-13 09:07:57 +0200
committerGitHub <noreply@github.com>2024-03-13 09:07:57 +0200
commita3df790eb284de95db2b6a8ea384083c1bfdc5ea (patch)
treebdc0e75db124c575ab31b596ddf4393c4e6c90b3 /zebra/zebra_gr.c
parentdfa27764a2c2d3d1b08bbba9cd9864c23c35574d (diff)
parent9ef76cff98de97d633961041d5ca9a3844f1ebbb (diff)
Merge pull request #15539 from donaldsharp/cleanup_leaky_sieve
zebra: Cleanup leaked memory on shutdown from GR code
Diffstat (limited to 'zebra/zebra_gr.c')
-rw-r--r--zebra/zebra_gr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/zebra_gr.c b/zebra/zebra_gr.c
index f4241f1d72..cee66cc055 100644
--- a/zebra/zebra_gr.c
+++ b/zebra/zebra_gr.c
@@ -298,6 +298,16 @@ struct zebra_gr_afi_clean {
* Functions to deal with capabilities
*/
+void zebra_gr_client_final_shutdown(struct zserv *client)
+{
+ struct client_gr_info *info;
+
+ while (!TAILQ_EMPTY(&client->gr_info_queue)) {
+ info = TAILQ_FIRST(&client->gr_info_queue);
+ zebra_gr_client_info_delete(client, info);
+ }
+}
+
/*
* Function to decode and call appropriate functions
* to handle client capabilities.