Merge pull request #9966 from idryzhov/release-daemon-table-chunks

zebra: don't register same hook multiple times
This commit is contained in:
Donald Sharp 2021-11-08 12:28:10 -05:00 committed by GitHub
commit b7bd8fce85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,6 @@ void table_manager_enable(struct zebra_vrf *zvrf)
zvrf->tbl_mgr = XCALLOC(MTYPE_TM_TABLE, sizeof(struct table_manager)); zvrf->tbl_mgr = XCALLOC(MTYPE_TM_TABLE, sizeof(struct table_manager));
zvrf->tbl_mgr->lc_list = list_new(); zvrf->tbl_mgr->lc_list = list_new();
zvrf->tbl_mgr->lc_list->del = delete_table_chunk; zvrf->tbl_mgr->lc_list->del = delete_table_chunk;
hook_register(zserv_client_close, release_daemon_table_chunks);
} }
/** /**

View File

@ -705,6 +705,8 @@ void zebra_vrf_init(void)
vrf_init(zebra_vrf_new, zebra_vrf_enable, zebra_vrf_disable, vrf_init(zebra_vrf_new, zebra_vrf_enable, zebra_vrf_disable,
zebra_vrf_delete, zebra_vrf_update); zebra_vrf_delete, zebra_vrf_update);
hook_register(zserv_client_close, release_daemon_table_chunks);
vrf_cmd_init(vrf_config_write); vrf_cmd_init(vrf_config_write);
if (vrf_is_backend_netns() && ns_have_netns()) { if (vrf_is_backend_netns() && ns_have_netns()) {