Commit 88152c8b authored by Lev Walkin's avatar Lev Walkin

Merge pull request #66 from simo5/memleak

Avoid memory leak on error
parents 51a7fdc6 ce71d918
......@@ -1148,8 +1148,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;
......
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