* Added valgrind memory leak tests in testmem.sh for restconf
* Added clicon_socket_set() and clicon_socket_get() functions for cleaning up backend server and restconf FCGI socket on termination. * Removed obsolete `-x` command-line option to clixon_cli.
This commit is contained in:
parent
28bd698968
commit
6e63f0a77b
29 changed files with 193 additions and 131 deletions
|
|
@ -224,7 +224,6 @@ json_str_escape_cdata(cbuf *cb,
|
|||
char *str)
|
||||
{
|
||||
int retval = -1;
|
||||
char *snew = NULL;
|
||||
int i;
|
||||
int esc = 0; /* cdata escape */
|
||||
|
||||
|
|
@ -261,12 +260,8 @@ json_str_escape_cdata(cbuf *cb,
|
|||
cprintf(cb, "%c", str[i]);
|
||||
break;
|
||||
}
|
||||
if ((snew = strdup(cbuf_get(cb))) ==NULL){
|
||||
clicon_err(OE_XML, errno, "strdup");
|
||||
goto done;
|
||||
}
|
||||
retval = 0;
|
||||
done:
|
||||
// done:
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue