diff --git a/apps/backend/backend_main.c b/apps/backend/backend_main.c index 978aaf2c..6e08006d 100644 --- a/apps/backend/backend_main.c +++ b/apps/backend/backend_main.c @@ -111,7 +111,9 @@ backend_terminate(clicon_handle h) stream_publish_exit(); clixon_plugin_exit(h); /* Delete all backend plugin RPC callbacks */ - rpc_callback_delete_all(); + rpc_callback_delete_all(h); + /* Delete all backend plugin upgrade callbacks */ + upgrade_callback_delete_all(h); if (pidfile) unlink(pidfile); diff --git a/lib/clixon/clixon_plugin.h b/lib/clixon/clixon_plugin.h index ed8b3d39..7b8fba66 100644 --- a/lib/clixon/clixon_plugin.h +++ b/lib/clixon/clixon_plugin.h @@ -242,12 +242,12 @@ int clixon_plugin_auth(clicon_handle h, void *arg); /* rpc callback API */ int rpc_callback_register(clicon_handle h, clicon_rpc_cb cb, void *arg, char *namespace, char *name); -int rpc_callback_delete_all(void); +int rpc_callback_delete_all(clicon_handle h); int rpc_callback_call(clicon_handle h, cxobj *xe, cbuf *cbret, void *arg); /* upgrade callback API */ int upgrade_callback_register(clicon_handle h, clicon_upgrade_cb cb, void *arg, char *name, char *namespace, uint32_t from, uint32_t to); -int upgrade_callback_delete_all(void); +int upgrade_callback_delete_all(clicon_handle h); int upgrade_callback_call(clicon_handle h, cxobj *xt, char *modname, char *modns, uint32_t from, uint32_t to, cbuf *cbret); #endif /* _CLIXON_PLUGIN_H_ */ diff --git a/lib/src/clixon_handle.c b/lib/src/clixon_handle.c index 2951de31..0feaf5b5 100644 --- a/lib/src/clixon_handle.c +++ b/lib/src/clixon_handle.c @@ -72,9 +72,9 @@ * 1) the internal structure contains a header (defined here) whereas higher * order libs (eg cli and backend) introduce more fields appended to this * struct. - * 2) ch_options accessed via clicon_data() are clixon config options are + * 2) ch_options accessed via clicon_options() are clixon config options are * string values appearing in the XML configfile accessed with -f. - * Alternatively, these could be accessed via clicon_conf_xml() + * Alternatively, these could be accessed via clicon_conf_xml() * 3) ch_data accessed via clicon_data() is more general purpose for any data. * that is, not only strings. And has separate namespace from options. */ diff --git a/lib/src/clixon_plugin.c b/lib/src/clixon_plugin.c index e1de0541..41e1ea21 100644 --- a/lib/src/clixon_plugin.c +++ b/lib/src/clixon_plugin.c @@ -466,7 +466,7 @@ rpc_callback_register(clicon_handle h, /*! Delete all RPC callbacks */ int -rpc_callback_delete_all(void) +rpc_callback_delete_all(clicon_handle h) { rpc_callback_t *rc; @@ -604,7 +604,7 @@ upgrade_callback_register(clicon_handle h, /*! Delete all Upgrade callbacks */ int -upgrade_callback_delete_all(void) +upgrade_callback_delete_all(clicon_handle h) { upgrade_callback_t *uc; diff --git a/lib/src/clixon_yang_module.c b/lib/src/clixon_yang_module.c index 4aa424e2..05e8d644 100644 --- a/lib/src/clixon_yang_module.c +++ b/lib/src/clixon_yang_module.c @@ -94,9 +94,9 @@ modstate_diff_free(modstate_diff_t *md) if (md == NULL) return 0; if (md->md_del) - free(md->md_del); + xml_free(md->md_del); if (md->md_mod) - free(md->md_mod); + xml_free(md->md_mod); free(md); return 0; }