mem leaks
This commit is contained in:
parent
d8269eee53
commit
79767045ad
3 changed files with 23 additions and 12 deletions
|
|
@ -825,6 +825,7 @@ main(int argc, char **argv)
|
|||
unlink(pidfile);
|
||||
if (sockfamily==AF_UNIX && lstat(sock, &st) == 0)
|
||||
unlink(sock);
|
||||
backend_terminate(h);
|
||||
exit(0); /* OK */
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -271,6 +271,8 @@ netconf_terminate(clicon_handle h)
|
|||
clicon_rpc_close_session(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
if ((yspec = clicon_netconf_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
event_exit();
|
||||
clicon_handle_exit(h);
|
||||
return 0;
|
||||
|
|
@ -389,7 +391,6 @@ main(int argc,
|
|||
if (netconf_plugin_load(h) < 0)
|
||||
goto done;
|
||||
|
||||
|
||||
/* Call start function is all plugins before we go interactive */
|
||||
tmp = *(argv-1);
|
||||
*(argv-1) = argv0;
|
||||
|
|
|
|||
|
|
@ -126,14 +126,7 @@ xml_cmp(const void* arg1,
|
|||
char *b2;
|
||||
char *keyname;
|
||||
|
||||
if (x1 == NULL){
|
||||
if (x2 == NULL)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
else if (x2 == NULL)
|
||||
return 1;
|
||||
assert(x1&&x2);
|
||||
y1 = xml_spec(x1);
|
||||
y2 = xml_spec(x2);
|
||||
if (y1==NULL || y2==NULL)
|
||||
|
|
@ -345,9 +338,24 @@ xml_search(cxobj *x0,
|
|||
0, xml_child_nr(x0));
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
/*! Position where to insert xml object into a list of children nodes
|
||||
* Insert after position returned
|
||||
* @param[in] x0 XML parent node.
|
||||
* @param[in] x XML node (to insert)
|
||||
* @param[in] low Lower bound
|
||||
* @param[in] upper Upper bound (+1)
|
||||
* @retval position
|
||||
* XXX: Replace "x" with parameters in xml_search1
|
||||
*/
|
||||
static int
|
||||
xml_insert_pos(cxobj *x0,
|
||||
cxobj *x,
|
||||
char *name,
|
||||
int yangi,
|
||||
enum rfc_6020 keyword,
|
||||
int keynr,
|
||||
char **keyvec,
|
||||
char **keyval,
|
||||
int low,
|
||||
int upper)
|
||||
{
|
||||
|
|
@ -401,6 +409,7 @@ xml_sort_insert(cxobj *x0,
|
|||
#endif
|
||||
return x;
|
||||
}
|
||||
#endif /* notyet */
|
||||
|
||||
/*! Find matching xml child given name and optional key values
|
||||
* container: x0, y->keyword, name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue