Merge pull request #6133 from sworleys/NHG-Fix-Dup-Leak

zebra: free unhashable (dup) NHEs via ID table cleanup
This commit is contained in:
Mark Stapp 2020-04-02 13:18:30 -04:00 committed by GitHub
commit 85775c5361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,10 +223,11 @@ void zebra_router_terminate(void)
zebra_vxlan_disable();
zebra_mlag_terminate();
hash_clean(zrouter.nhgs, zebra_nhg_hash_free);
hash_free(zrouter.nhgs);
hash_clean(zrouter.nhgs_id, NULL);
/* Free NHE in ID table only since it has unhashable entries as well */
hash_clean(zrouter.nhgs_id, zebra_nhg_hash_free);
hash_free(zrouter.nhgs_id);
hash_clean(zrouter.nhgs, NULL);
hash_free(zrouter.nhgs);
hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);
hash_free(zrouter.rules_hash);