YANG optimization: move "when" and "mymodule" to external maps

This commit is contained in:
Olof hagsand 2024-08-10 17:38:12 +02:00
parent 275cefbae7
commit c08dac2e5d
13 changed files with 247 additions and 314 deletions

View file

@ -116,6 +116,7 @@ backend_terminate(clixon_handle h)
if ((yspec = clicon_dbspec_yang(h)) != NULL){
ys_free(yspec);
}
yang_exit(h);
if ((yspec = clicon_config_yang(h)) != NULL)
ys_free(yspec);
if ((yspec = clicon_nacm_ext_yang(h)) != NULL)

View file

@ -180,6 +180,7 @@ cli_terminate(clixon_handle h)
clicon_rpc_close_session(h);
if ((yspec = clicon_dbspec_yang(h)) != NULL)
ys_free(yspec);
yang_exit(h);
if ((yspec = clicon_config_yang(h)) != NULL)
ys_free(yspec);
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)

View file

@ -588,6 +588,7 @@ netconf_terminate(clixon_handle h)
ys_free(yspec);
if ((yspec = clicon_config_yang(h)) != NULL)
ys_free(yspec);
yang_exit(h);
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
cvec_free(nsctx);
if ((x = clicon_conf_xml(h)) != NULL)

View file

@ -365,12 +365,12 @@ restconf_terminate(clixon_handle h)
close(fs);
/* Delete all plugins, and RPC callbacks */
clixon_plugin_module_exit(h);
clicon_rpc_close_session(h);
if ((yspec = clicon_dbspec_yang(h)) != NULL)
ys_free(yspec);
if ((yspec = clicon_config_yang(h)) != NULL)
ys_free(yspec);
yang_exit(h);
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
cvec_free(nsctx);
if ((x = clicon_conf_xml(h)) != NULL)

View file

@ -126,6 +126,7 @@ snmp_terminate(clixon_handle h)
ys_free(yspec);
if ((yspec = clicon_config_yang(h)) != NULL)
ys_free(yspec);
yang_exit(h);
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
cvec_free(nsctx);
if ((x = clicon_conf_xml(h)) != NULL)