Fixed if-feature-expr parser memory leak
Make test go directly to docker/main
This commit is contained in:
parent
a00e36caa2
commit
19b210b1b6
3 changed files with 9 additions and 4 deletions
|
|
@ -207,7 +207,7 @@ example: checkinstall util warnroot
|
||||||
# Run a clixon test container.
|
# Run a clixon test container.
|
||||||
# Alt: cd test; ./all.sh
|
# Alt: cd test; ./all.sh
|
||||||
test:
|
test:
|
||||||
(cd docker && $(MAKE) $(MFLAGS) test)
|
$(MAKE) -C docker $(MFLAGS) $@
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
for i in docker; \
|
for i in docker; \
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,7 @@ distclean: clean
|
||||||
do (cd $$i; $(MAKE) $(MFLAGS) $@); done
|
do (cd $$i; $(MAKE) $(MFLAGS) $@); done
|
||||||
|
|
||||||
test:
|
test:
|
||||||
for i in $(SUBDIRS); \
|
$(MAKE) -C main $(MFLAGS) $@
|
||||||
do (cd $$i; $(MAKE) $(MFLAGS) $@); done
|
|
||||||
|
|
||||||
depend:
|
depend:
|
||||||
for i in $(SUBDIRS); \
|
for i in $(SUBDIRS); \
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,8 @@ clixon_if_feature_parseerror(void *arg,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if feature "str" is enabled or not in context of yang node ys
|
/*! 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
|
static int
|
||||||
if_feature_check(char *str,
|
if_feature_check(char *str,
|
||||||
|
|
@ -198,7 +200,11 @@ iffactor : NOT sep1 iffactor { _PARSE_DEBUG("factor-> NOT sep factor");
|
||||||
| TOKEN {
|
| TOKEN {
|
||||||
_PARSE_DEBUG("factor->TOKEN");
|
_PARSE_DEBUG("factor->TOKEN");
|
||||||
if (_IF->if_ys == NULL) $$ = 0;
|
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);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue