{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:
Harald Welte 2015-12-18 14:57:04 +01:00
parent 8526d158f8
commit 629391321f
3 changed files with 5 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}