diff --git a/src/hnbap_common.c b/src/hnbap_common.c index cdf38e0d..2cd7ee28 100644 --- a/src/hnbap_common.c +++ b/src/hnbap_common.c @@ -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; } diff --git a/src/ranap_common.c b/src/ranap_common.c index 2e7b2993..8081c01a 100644 --- a/src/ranap_common.c +++ b/src/ranap_common.c @@ -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; } diff --git a/src/rua_common.c b/src/rua_common.c index 8c21faa1..3d7bacdf 100644 --- a/src/rua_common.c +++ b/src/rua_common.c @@ -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; }