diff --git a/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.c b/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.c index e6d435617..dbf96b18c 100644 --- a/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.c +++ b/src/core/libs/supl/asn-rrlp/constr_SEQUENCE.c @@ -1151,8 +1151,10 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, if(!epres) _ASN_DECODE_STARVED; /* Get the extensions map */ - if(per_get_many_bits(pd, epres, 0, bmlength)) + if(per_get_many_bits(pd, epres, 0, bmlength)) { + FREEMEM(epres); _ASN_DECODE_STARVED; + } memset(&epmd, 0, sizeof(epmd)); epmd.buffer = epres; diff --git a/src/core/libs/supl/asn-supl/constr_SEQUENCE.c b/src/core/libs/supl/asn-supl/constr_SEQUENCE.c index e6d435617..a20057539 100644 --- a/src/core/libs/supl/asn-supl/constr_SEQUENCE.c +++ b/src/core/libs/supl/asn-supl/constr_SEQUENCE.c @@ -1151,9 +1151,10 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, if(!epres) _ASN_DECODE_STARVED; /* Get the extensions map */ - if(per_get_many_bits(pd, epres, 0, bmlength)) + if(per_get_many_bits(pd, epres, 0, bmlength)) { + FREEMEM(epres); _ASN_DECODE_STARVED; - + } memset(&epmd, 0, sizeof(epmd)); epmd.buffer = epres; epmd.nbits = bmlength;