mirror of https://gerrit.osmocom.org/asn1c
Free memory pointed by r_value and r_size
This commit is contained in:
parent
9b78083824
commit
64505efde4
|
@ -35,6 +35,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
int alphabet_table_compiled;
|
||||
int produce_st = 0;
|
||||
int ulong_optimize = 0;
|
||||
int ret = 0;
|
||||
|
||||
ct = expr->combined_constraints;
|
||||
if(ct == NULL)
|
||||
|
@ -158,7 +159,7 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
OUT("\n");
|
||||
OUT("/* Constraint check succeeded */\n");
|
||||
OUT("return 0;\n");
|
||||
return 0;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -197,7 +198,8 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
INDENTED(OUT("/* Nothing is here. See below */\n"));
|
||||
OUT("}\n");
|
||||
OUT("\n");
|
||||
return 1;
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
INDENT(-1);
|
||||
OUT(") {\n");
|
||||
|
@ -222,7 +224,11 @@ asn1c_emit_constraint_checking_code(arg_t *arg) {
|
|||
INDENT(-1);
|
||||
OUT("}\n");
|
||||
|
||||
return 0;
|
||||
end:
|
||||
if (r_value) asn1constraint_range_free(r_value);
|
||||
if (r_size) asn1constraint_range_free(r_size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue