Skip to content

Commit

Permalink
Fix memory leakeage
Browse files Browse the repository at this point in the history
  • Loading branch information
brchiu authored and vlm committed Nov 14, 2017
1 parent 8ae074c commit 0299037
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libasn1fix/asn1fix_retrieve.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ asn1f_lookup_symbol_impl(arg_t *arg, asn1p_expr_t *rhs_pspecs, const asn1p_ref_t
return NULL;
}

DISPOSE_OF_MY_NAMESPACE();
my_namespace = asn1_namespace_new_from_module(imports_from, 1);
DEBUG("Lookup (%s) in %s for line %d", asn1f_printable_reference(ref),
asn1_namespace_string(my_namespace), ref->_lineno);
Expand Down Expand Up @@ -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->_lineno);
errno = EPERM;
DISPOSE_OF_MY_NAMESPACE();
return NULL;
}
if(rhs_pspecs && ref_tc->lhs_params) {
Expand Down Expand Up @@ -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),
asn1f_printable_reference(ref), ref->_lineno);
errno = ETOOMANYREFS;
DISPOSE_OF_MY_NAMESPACE();
return NULL;
}

Expand Down

0 comments on commit 0299037

Please sign in to comment.