diff options
author | Harald Welte <laforge@gnumonks.org> | 2015-12-18 14:57:04 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-12-18 14:58:34 +0100 |
commit | 629391321f10490c5b5f1edc5035ea2e5679ad3e (patch) | |
tree | f52f1edbf531ccd6689907854b0a16ae4ed2e168 /src | |
parent | 8526d158f893283fee0b176ef9c7401133949815 (diff) |
{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.
Diffstat (limited to 'src')
-rw-r--r-- | src/hnbap_common.c | 2 | ||||
-rw-r--r-- | src/ranap_common.c | 6 | ||||
-rw-r--r-- | src/rua_common.c | 2 |
3 files changed, 5 insertions, 5 deletions
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 @@ 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 2e7b299..8081c01 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 8c21faa..3d7bacd 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; } |