summaryrefslogtreecommitdiffstats
path: root/vrrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-03-21 13:54:21 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-03-21 13:54:21 +0100
commitd8bc11a592110abdd14d11dfcb2ce623653ecab5 (patch)
treeeee3628586497e48192f65326316f0eb91114011 /vrrpd
parentMerge pull request #12816 from gpnaveen/stc_rte_err_msg (diff)
downloadfrr-d8bc11a592110abdd14d11dfcb2ce623653ecab5.tar.xz
frr-d8bc11a592110abdd14d11dfcb2ce623653ecab5.zip
*: Add a hash_clean_and_free() function
Add a hash_clean_and_free() function as well as convert the code to use it. This function also takes a double pointer to the hash to set it NULL. Also it cleanly does nothing if the pointer is NULL( as a bunch of code tested for ). Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'vrrpd')
-rw-r--r--vrrpd/vrrp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index 5bb1d6911..1d934f616 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -2411,6 +2411,5 @@ void vrrp_fini(void)
list_delete(&vrs);
- hash_clean(vrrp_vrouters_hash, NULL);
- hash_free(vrrp_vrouters_hash);
+ hash_clean_and_free(&vrrp_vrouters_hash, NULL);
}