summaryrefslogtreecommitdiff
path: root/pimd/pim_msdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_msdp.c')
-rw-r--r--pimd/pim_msdp.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c
index dfa5ffeeec..9d29a33a52 100644
--- a/pimd/pim_msdp.c
+++ b/pimd/pim_msdp.c
@@ -1367,21 +1367,13 @@ void pim_msdp_exit(struct pim_instance *pim)
while ((mg = SLIST_FIRST(&pim->msdp.mglist)) != NULL)
pim_msdp_mg_free(pim, &mg);
- if (pim->msdp.peer_hash) {
- hash_clean(pim->msdp.peer_hash, NULL);
- hash_free(pim->msdp.peer_hash);
- pim->msdp.peer_hash = NULL;
- }
+ hash_clean_and_free(&pim->msdp.peer_hash, NULL);
if (pim->msdp.peer_list) {
list_delete(&pim->msdp.peer_list);
}
- if (pim->msdp.sa_hash) {
- hash_clean(pim->msdp.sa_hash, NULL);
- hash_free(pim->msdp.sa_hash);
- pim->msdp.sa_hash = NULL;
- }
+ hash_clean_and_free(&pim->msdp.sa_hash, NULL);
if (pim->msdp.sa_list) {
list_delete(&pim->msdp.sa_list);