Skip to content

Commit

Permalink
filterx-grammar: free LL_IDENTIFIER tokens
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed May 4, 2024
1 parent 6179d2e commit 6df046c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/filterx/filterx-grammar.ym
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ generator_assignment
filterx_shorthand_add(shorthand, setattr);
filterx_shorthand_add(shorthand, $5);

free($3);
$$ = shorthand;
}
| expr '[' expr ']' KW_ASSIGN expr_generator
Expand Down Expand Up @@ -209,6 +210,7 @@ generator_casted_assignment
FilterXExpr *shorthand = filterx_shorthand_new();
filterx_shorthand_add(shorthand, assign);
filterx_shorthand_add(shorthand, $5);
free($3);

$$ = shorthand;
}
Expand All @@ -224,6 +226,7 @@ generator_casted_assignment
FilterXExpr *shorthand = filterx_shorthand_new();
filterx_shorthand_add(shorthand, setattr);
filterx_shorthand_add(shorthand, $7);
free($3);

$$ = shorthand;
}
Expand All @@ -239,6 +242,7 @@ generator_casted_assignment
FilterXExpr *shorthand = filterx_shorthand_new();
filterx_shorthand_add(shorthand, set_subscript);
filterx_shorthand_add(shorthand, $8);
free($6);

$$ = shorthand;
}
Expand All @@ -255,6 +259,7 @@ generator_casted_assignment
FilterXExpr *shorthand = filterx_shorthand_new();
filterx_shorthand_add(shorthand, set_subscript);
filterx_shorthand_add(shorthand, $7);
free($5);

$$ = shorthand;
}
Expand Down Expand Up @@ -312,6 +317,7 @@ function_call
GError *error = NULL;
FilterXExpr *res = filterx_function_lookup(configuration, $1, $3, &error);
CHECK_ERROR_GERROR(res, @$, error, "function lookup failed: %s()", $1);
free($1);
$$ = res;
}
;
Expand Down

0 comments on commit 6df046c

Please sign in to comment.