Skip to content

Commit

Permalink
yang parser BUGFIX double free
Browse files Browse the repository at this point in the history
Fixes #739
  • Loading branch information
michalvasko committed Mar 29, 2019
1 parent 9783c5a commit 88bd6c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/parser_yang_bis.c
Original file line number Diff line number Diff line change
Expand Up @@ -9123,6 +9123,7 @@ void
yyerror(YYLTYPE *yylloc, void *scanner, struct yang_parameter *param, ...)
{
free(*param->value);
*param->value = NULL;
if (yylloc->first_line != -1) {
if (*param->data_node && (*param->data_node) == (*param->actual_node)) {
LOGVAL(param->module->ctx, LYE_INSTMT, LY_VLOG_LYS, *param->data_node, yyget_text(scanner));
Expand Down
1 change: 1 addition & 0 deletions src/yang.y.in
Original file line number Diff line number Diff line change
Expand Up @@ -4833,6 +4833,7 @@ void
yyerror(YYLTYPE *yylloc, void *scanner, struct yang_parameter *param, ...)
{
free(*param->value);
*param->value = NULL;
if (yylloc->first_line != -1) {
if (*param->data_node && (*param->data_node) == (*param->actual_node)) {
LOGVAL(param->module->ctx, LYE_INSTMT, LY_VLOG_LYS, *param->data_node, yyget_text(scanner));
Expand Down

0 comments on commit 88bd6c5

Please sign in to comment.