mem leaks

This commit is contained in:
Olof hagsand 2017-12-31 12:05:21 +01:00
parent d8269eee53
commit 79767045ad
3 changed files with 23 additions and 12 deletions

View file

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

View file

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