diff --git a/Makefile.in b/Makefile.in index f1a38657..5fe7e08f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -207,7 +207,7 @@ example: checkinstall util warnroot # Run a clixon test container. # Alt: cd test; ./all.sh test: - (cd docker && $(MAKE) $(MFLAGS) test) + $(MAKE) -C docker $(MFLAGS) $@ docker: for i in docker; \ diff --git a/docker/Makefile.in b/docker/Makefile.in index cec680a9..85b4c8bd 100644 --- a/docker/Makefile.in +++ b/docker/Makefile.in @@ -62,8 +62,7 @@ distclean: clean do (cd $$i; $(MAKE) $(MFLAGS) $@); done test: - for i in $(SUBDIRS); \ - do (cd $$i; $(MAKE) $(MFLAGS) $@); done + $(MAKE) -C main $(MFLAGS) $@ depend: for i in $(SUBDIRS); \ diff --git a/lib/src/clixon_if_feature_parse.y b/lib/src/clixon_if_feature_parse.y index 6ed149ac..3348b471 100644 --- a/lib/src/clixon_if_feature_parse.y +++ b/lib/src/clixon_if_feature_parse.y @@ -115,6 +115,8 @@ clixon_if_feature_parseerror(void *arg, } /*! Check if feature "str" is enabled or not in context of yang node ys + * @param[in] str feature str. + * @param[in] ys If-feature type yang node */ static int if_feature_check(char *str, @@ -198,7 +200,11 @@ iffactor : NOT sep1 iffactor { _PARSE_DEBUG("factor-> NOT sep factor"); | TOKEN { _PARSE_DEBUG("factor->TOKEN"); if (_IF->if_ys == NULL) $$ = 0; - else if (($$ = if_feature_check($1, _IF->if_ys)) < 0) YYERROR; + else if (($$ = if_feature_check($1, _IF->if_ys)) < 0) { + free($1); + YYERROR; + } + free($1); } ;