Revert "* Added valgrind memory leak tests in testmem.sh for restconf"
String error
This reverts commit 6e63f0a77b.
This commit is contained in:
parent
5b6bdbfd3a
commit
a73d2bd242
29 changed files with 131 additions and 193 deletions
|
|
@ -77,10 +77,7 @@
|
|||
|
||||
#define BACKEND_LOGFILE "/usr/local/var/clixon_backend.log"
|
||||
|
||||
/*! Clean and close all state of backend (but dont exit).
|
||||
* Cannot use h after this
|
||||
* @param[in] h Clixon handle
|
||||
*/
|
||||
/*! Terminate. Cannot use h after this */
|
||||
static int
|
||||
backend_terminate(clicon_handle h)
|
||||
{
|
||||
|
|
@ -90,11 +87,8 @@ backend_terminate(clicon_handle h)
|
|||
char *sockpath = clicon_sock(h);
|
||||
cxobj *x;
|
||||
struct stat st;
|
||||
int ss;
|
||||
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
if ((ss = clicon_socket_get(h)) != -1)
|
||||
close(ss);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
yspec_free(yspec);
|
||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||
|
|
@ -937,11 +931,10 @@ main(int argc,
|
|||
goto done;
|
||||
}
|
||||
|
||||
/* Initialize server socket and save it to handle */
|
||||
/* Initialize server socket */
|
||||
if ((ss = backend_server_socket(h)) < 0)
|
||||
goto done;
|
||||
if (clicon_socket_set(h, ss) < 0)
|
||||
goto done;
|
||||
|
||||
if (debug)
|
||||
clicon_option_dump(h, debug);
|
||||
|
||||
|
|
@ -952,6 +945,8 @@ main(int argc,
|
|||
retval = 0;
|
||||
done:
|
||||
clicon_log(LOG_NOTICE, "%s: %u Terminated retval:%d", __PROGRAM__, getpid(), retval);
|
||||
if (ss != -1)
|
||||
close(ss);
|
||||
backend_terminate(h); /* Cannot use h after this */
|
||||
|
||||
return retval;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue