diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2016-01-07 12:27:41 +0100 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2016-01-07 12:27:41 +0100 |
commit | d10002cf8dcdbf3951c3eb36b2c429ae2046880a (patch) | |
tree | 90d5ea608524974d18b25a1f49dde4fe6aa1cf88 /src | |
parent | b433b97474a28143b3e4a57d3684c1dbea71375d (diff) |
asn1tostruct: Add memory free functions and use them in HNBAP
Diffstat (limited to 'src')
-rw-r--r-- | src/hnbgw_hnbap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c index eda5139..971e97e 100644 --- a/src/hnbgw_hnbap.c +++ b/src/hnbgw_hnbap.c @@ -126,6 +126,7 @@ static int hnbgw_rx_hnb_deregister(struct hnb_context *ctx, ANY_t *in) DEBUGP(DHNBAP, "HNB-DE-REGSITER cause=%ld\n", ies.cause); + hnbap_free_hnbde_registeries(&ies); hnb_context_release(ctx); return 0; @@ -153,7 +154,9 @@ static int hnbgw_rx_hnb_register_req(struct hnb_context *ctx, ANY_t *in) DEBUGP(DHNBAP, "HNB-REGISTER-REQ from %s\n", ctx->identity_info); /* Send HNBRegisterAccept */ - return hnbgw_tx_hnb_register_acc(ctx); + rc = hnbgw_tx_hnb_register_acc(ctx); + hnbap_free_hnbregisterrequesties(&ies); + return rc; } static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in) @@ -192,6 +195,7 @@ static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in) if (!ue) ue = ue_context_alloc(ctx, imsi); + hnbap_free_ueregisterrequesties(&ies); /* Send UERegisterAccept */ return hnbgw_tx_ue_register_acc(ue); } @@ -216,6 +220,7 @@ static int hnbgw_rx_ue_deregister(struct hnb_context *ctx, ANY_t *in) if (ue) ue_context_free(ue); + hnbap_free_uede_registeries(&ies); return 0; } @@ -231,6 +236,7 @@ static int hnbgw_rx_err_ind(struct hnb_context *hnb, ANY_t *in) LOGP(DHNBAP, LOGL_NOTICE, "HNBAP ERROR.ind, cause: %s\n", hnbap_cause_str(&ies.cause)); + hnbap_free_errorindicationies(&ies); return 0; } |