1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Fix memory leak

This commit is contained in:
Carles Fernandez 2019-08-25 11:47:49 +02:00
parent 85e30b4759
commit 38ceb848f5
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 6 additions and 3 deletions

View File

@ -1151,8 +1151,10 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
if(!epres) _ASN_DECODE_STARVED; if(!epres) _ASN_DECODE_STARVED;
/* Get the extensions map */ /* 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; _ASN_DECODE_STARVED;
}
memset(&epmd, 0, sizeof(epmd)); memset(&epmd, 0, sizeof(epmd));
epmd.buffer = epres; epmd.buffer = epres;

View File

@ -1151,9 +1151,10 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
if(!epres) _ASN_DECODE_STARVED; if(!epres) _ASN_DECODE_STARVED;
/* Get the extensions map */ /* 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; _ASN_DECODE_STARVED;
}
memset(&epmd, 0, sizeof(epmd)); memset(&epmd, 0, sizeof(epmd));
epmd.buffer = epres; epmd.buffer = epres;
epmd.nbits = bmlength; epmd.nbits = bmlength;