hnbgw_hnbap: Zero IEs_t before decode is called
This ensures that presenceMask is zero and optional fields will be freed
correctly.
This needs to happen for ranap and rua as well.
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 971e97e..b810915 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -119,6 +119,7 @@
HNBDe_RegisterIEs_t ies;
int rc;
+ memset(&ies, 0, sizeof(ies));
rc = hnbap_decode_hnbde_registeries(&ies, in);
if (rc < 0)
return rc;
@@ -137,6 +138,7 @@
HNBRegisterRequestIEs_t ies;
int rc;
+ memset(&ies, 0, sizeof(ies));
rc = hnbap_decode_hnbregisterrequesties(&ies, in);
if (rc < 0)
return rc;
@@ -166,6 +168,7 @@
char imsi[16];
int rc;
+ memset(&ies, 0, sizeof(ies));
rc = hnbap_decode_ueregisterrequesties(&ies, in);
if (rc < 0)
return rc;
@@ -207,6 +210,7 @@
int rc;
uint32_t ctxid;
+ memset(&ies, 0, sizeof(ies));
rc = hnbap_decode_uede_registeries(&ies, in);
if (rc < 0)
return rc;
@@ -229,6 +233,7 @@
ErrorIndicationIEs_t ies;
int rc;
+ memset(&ies, 0, sizeof(ies));
rc = hnbap_decode_errorindicationies(&ies, in);
if (rc < 0)
return rc;