{hnbap,ranap,rua}_common: use FREEMEM(), not free() directly
If we allocate with CALLOC/MALLOC macros, we need to release memory via the same API.
This commit is contained in:
parent
8526d158f8
commit
629391321f
|
@ -235,7 +235,7 @@ IE_t *hnbap_new_ie(ProtocolIE_ID_t id,
|
|||
|
||||
if (asn1_xer_print)
|
||||
if (xer_fprint(stdout, &asn_DEF_IE, buff) < 0) {
|
||||
free(buff);
|
||||
FREEMEM(buff);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ RANAP_IE_t *ranap_new_ie(RANAP_ProtocolIE_ID_t id,
|
|||
|
||||
if (asn1_xer_print)
|
||||
if (xer_fprint(stdout, &asn_DEF_RANAP_IE, buff) < 0) {
|
||||
free(buff);
|
||||
FREEMEM(buff);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,8 @@ RANAP_ProtocolIE_FieldPair_t *ranap_new_ie_pair(RANAP_ProtocolIE_ID_t id,
|
|||
ANY_fromType_aper(&buff->secondValue, type2, sptr2);
|
||||
|
||||
if (asn1_xer_print)
|
||||
if (xer_fprint(stdout, &asn_DEF_RANAP_IE, buff) < 0) {
|
||||
free(buff);
|
||||
if (xer_fprint(stdout, &asn_DEF_RANAP_ProtocolIE_FieldPair, buff) < 0) {
|
||||
FREEMEM(buff);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ RUA_IE_t *rua_new_ie(RUA_ProtocolIE_ID_t id,
|
|||
|
||||
if (asn1_xer_print)
|
||||
if (xer_fprint(stdout, &asn_DEF_RUA_IE, buff) < 0) {
|
||||
free(buff);
|
||||
FREEMEM(buff);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue