Memory leaks and errors

This commit is contained in:
Olof Hagsand 2019-03-21 20:36:47 +01:00
parent 3f68cca06c
commit 10d45bcee3
5 changed files with 11 additions and 9 deletions

View file

@ -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.
*/

View file

@ -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;

View file

@ -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;
}