diff --git a/apps/restconf/restconf_main_evhtp.c b/apps/restconf/restconf_main_evhtp.c index d9c08cdc..c0aa0d32 100644 --- a/apps/restconf/restconf_main_evhtp.c +++ b/apps/restconf/restconf_main_evhtp.c @@ -154,7 +154,7 @@ restconf_sig_term(int arg) // stream_child_freeall(_CLICON_HANDLE); restconf_terminate(_CLICON_HANDLE); } - clicon_exit_set(); /* checked in clixon_event_loop() */ + clicon_exit_set(); /* XXX should rather signal event_base_loop */ exit(-1); } @@ -885,6 +885,8 @@ cx_evhtp_socket_extract(clicon_handle h, } retval = 0; done: + if (cv) + cv_free(cv); if (reason) free(reason); return retval; @@ -1230,6 +1232,15 @@ restconf_config_backend(clicon_handle h, if (restconf_drop_privileges(h, WWWUSER) < 0) goto done; } + /* Exit can go via signal handler without returning here */ + if (xconfig){ + xml_free(xconfig); + xconfig = NULL; + } + if (nsc){ + cvec_free(nsc); + nsc = NULL; + } /* libevent main loop */ event_base_loop(eh->eh_evbase, 0); /* XXX: replace with clixon_event_loop() */ retval = 0; diff --git a/docker/main/Makefile.in b/docker/main/Makefile.in index 393fbe2f..7bae0446 100644 --- a/docker/main/Makefile.in +++ b/docker/main/Makefile.in @@ -81,7 +81,7 @@ push: # therefore the sleep 1 before tests start test: docker ./cleanup.sh ; ./start.sh # kill (ignore error) and the start it - sudo docker exec -t clixon-system bash -c 'sleep 1 && cd /usr/local/bin/test && ./all.sh' + sudo docker exec -t clixon-system bash -c 'sleep 2 && cd /usr/local/bin/test && ./all.sh' depend: diff --git a/lib/src/Makefile.in b/lib/src/Makefile.in index 02e522b1..0a6ddd45 100644 --- a/lib/src/Makefile.in +++ b/lib/src/Makefile.in @@ -214,7 +214,7 @@ distclean: clean .SUFFIXES: .SUFFIXES: .c .o -.c.o: $(GENSRC) +.c.o: rm -f $@ && $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c $< # Compute the length of the date command (and add some extra with XXX) diff --git a/test/test_nacm_ext.sh b/test/test_nacm_ext.sh index 9c2ab00b..d8bb66ca 100755 --- a/test/test_nacm_ext.sh +++ b/test/test_nacm_ext.sh @@ -143,15 +143,15 @@ if [ $BE -ne 0 ]; then start_backend -s init -f $cfg -- -s fi +new "waiting" +wait_backend + # Load restconf config for evhtp backend config if [ "${WITH_RESTCONF}" = "evhtp" ]; then . ./restconfig.sh restconfigrun fi -new "waiting" -wait_backend - if [ $RC -ne 0 ]; then new "kill old restconf daemon" stop_restconf_pre diff --git a/test/test_restconf.sh b/test/test_restconf.sh index 1e705502..8ccfd7f9 100755 --- a/test/test_restconf.sh +++ b/test/test_restconf.sh @@ -409,4 +409,7 @@ for proto in $protos; do done done +# unset conditional parameters +unset RCPROTO + rm -rf $dir diff --git a/test/vagrant/clixon.sh b/test/vagrant/clixon.sh index d57a3e7e..6f1ffefc 100755 --- a/test/vagrant/clixon.sh +++ b/test/vagrant/clixon.sh @@ -69,6 +69,7 @@ sudo $MAKE install sudo ldconfig cd test echo "#!/usr/bin/env bash" > ./site.sh +echo "IPv6=true" >> ./site.sh if [ $release = "freebsd" ]; then echo "make=gmake" >> ./site.sh fi