{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.
diff --git a/src/hnbap_common.c b/src/hnbap_common.c
index cdf38e0..2cd7ee2 100644
--- a/src/hnbap_common.c
+++ b/src/hnbap_common.c
@@ -235,7 +235,7 @@
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 2e7b299..8081c01 100644
--- a/src/ranap_common.c
+++ b/src/ranap_common.c
@@ -179,7 +179,7 @@
if (asn1_xer_print)
if (xer_fprint(stdout, &asn_DEF_RANAP_IE, buff) < 0) {
- free(buff);
+ FREEMEM(buff);
return NULL;
}
@@ -208,8 +208,8 @@
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 8c21faa..3d7bacd 100644
--- a/src/rua_common.c
+++ b/src/rua_common.c
@@ -209,7 +209,7 @@
if (asn1_xer_print)
if (xer_fprint(stdout, &asn_DEF_RUA_IE, buff) < 0) {
- free(buff);
+ FREEMEM(buff);
return NULL;
}