Commit 0299037e authored by Bi-Ruei, Chiu's avatar Bi-Ruei, Chiu Committed by Lev Walkin

Fix memory leakeage

parent 8ae074ce
...@@ -286,6 +286,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t ...@@ -286,6 +286,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t
return NULL; return NULL;
} }
DISPOSE_OF_MY_NAMESPACE();
my_namespace = asn1_namespace_new_from_module(imports_from, 1); my_namespace = asn1_namespace_new_from_module(imports_from, 1);
DEBUG("Lookup (%s) in %s for line %d", asn1f_printable_reference(ref), DEBUG("Lookup (%s) in %s for line %d", asn1f_printable_reference(ref),
asn1_namespace_string(my_namespace), ref->_lineno); asn1_namespace_string(my_namespace), ref->_lineno);
...@@ -341,6 +342,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t ...@@ -341,6 +342,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t
ref_tc->Identifier, asn1f_printable_reference(ref), ref_tc->Identifier, asn1f_printable_reference(ref),
ref->_lineno); ref->_lineno);
errno = EPERM; errno = EPERM;
DISPOSE_OF_MY_NAMESPACE();
return NULL; return NULL;
} }
if(rhs_pspecs && ref_tc->lhs_params) { if(rhs_pspecs && ref_tc->lhs_params) {
...@@ -383,6 +385,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t ...@@ -383,6 +385,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t
asn1_namespace_string(arg->ns), asn1_namespace_string(arg->ns),
asn1f_printable_reference(ref), ref->_lineno); asn1f_printable_reference(ref), ref->_lineno);
errno = ETOOMANYREFS; errno = ETOOMANYREFS;
DISPOSE_OF_MY_NAMESPACE();
return NULL; return NULL;
} }
......
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