Commit ed409e2b authored by Lev Walkin's avatar Lev Walkin

remove memleaks

parent 47fc74ca
...@@ -4314,6 +4314,7 @@ yyreduce: ...@@ -4314,6 +4314,7 @@ yyreduce:
{ {
(yyval.a_value) = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr)); (yyval.a_value) = asn1p_value_fromtype((yyvsp[(2) - (2)].a_expr));
checkmem((yyval.a_value)); checkmem((yyval.a_value));
asn1p_expr_free((yyvsp[(2) - (2)].a_expr));
} }
break; break;
...@@ -4322,6 +4323,7 @@ yyreduce: ...@@ -4322,6 +4323,7 @@ yyreduce:
{ {
(yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr)); (yyval.a_value) = asn1p_value_fromtype((yyvsp[(1) - (1)].a_expr));
checkmem((yyval.a_value)); checkmem((yyval.a_value));
asn1p_expr_free((yyvsp[(1) - (1)].a_expr));
} }
break; break;
...@@ -4939,6 +4941,7 @@ yyreduce: ...@@ -4939,6 +4941,7 @@ yyreduce:
{ {
(yyval.a_ref) = asn1p_ref_new(yylineno, currentModule); (yyval.a_ref) = asn1p_ref_new(yylineno, currentModule);
asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase); asn1p_ref_add_component((yyval.a_ref), (yyvsp[(1) - (1)].tv_str), RLT_lowercase);
free((yyvsp[(1) - (1)].tv_str));
} }
break; break;
......
...@@ -1986,11 +1986,13 @@ ContainedSubtype: ...@@ -1986,11 +1986,13 @@ ContainedSubtype:
TOK_INCLUDES Type { TOK_INCLUDES Type {
$$ = asn1p_value_fromtype($2); $$ = asn1p_value_fromtype($2);
checkmem($$); checkmem($$);
asn1p_expr_free($2);
} }
/* Can't put Type here because of conflicts. Simplified subset */ /* Can't put Type here because of conflicts. Simplified subset */
| DefinedUntaggedType { | DefinedUntaggedType {
$$ = asn1p_value_fromtype($1); $$ = asn1p_value_fromtype($1);
checkmem($$); checkmem($$);
asn1p_expr_free($1);
} }
; ;
...@@ -2475,6 +2477,7 @@ IdentifierAsReference: ...@@ -2475,6 +2477,7 @@ IdentifierAsReference:
Identifier { Identifier {
$$ = asn1p_ref_new(yylineno, currentModule); $$ = asn1p_ref_new(yylineno, currentModule);
asn1p_ref_add_component($$, $1, RLT_lowercase); asn1p_ref_add_component($$, $1, RLT_lowercase);
free($1);
}; };
IdentifierAsValue: IdentifierAsValue:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment