Merge "IPACM: fix pointer init/free issue"
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index 4cf0e29..eaa59eb 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -78,6 +78,9 @@
ipv6_set = 0;
ipv4_header_set = false;
ipv6_header_set = false;
+ odu_route_rule_v4_hdl = NULL;
+ odu_route_rule_v6_hdl = NULL;
+ eth_client = NULL;
int m_fd_odu, ret = IPACM_SUCCESS;
Nat_App = NatApp::GetInstance();
diff --git a/ipacm/src/IPACM_Wan.cpp b/ipacm/src/IPACM_Wan.cpp
index 5a3c27d..f2cda33 100644
--- a/ipacm/src/IPACM_Wan.cpp
+++ b/ipacm/src/IPACM_Wan.cpp
@@ -75,6 +75,10 @@
{
num_firewall_v4 = 0;
num_firewall_v6 = 0;
+ wan_route_rule_v4_hdl = NULL;
+ wan_route_rule_v6_hdl = NULL;
+ wan_route_rule_v6_hdl_a5 = NULL;
+ wan_client = NULL;
if(iface_query != NULL)
{
diff --git a/ipacm/src/IPACM_Wlan.cpp b/ipacm/src/IPACM_Wlan.cpp
index 078800c..165ef72 100644
--- a/ipacm/src/IPACM_Wlan.cpp
+++ b/ipacm/src/IPACM_Wlan.cpp
@@ -90,6 +90,7 @@
num_wifi_client = 0;
header_name_count = 0;
+ wlan_client = NULL;
if(iface_query != NULL)
{
@@ -2471,9 +2472,15 @@
for (i = 0; i < num_wifi_client; i++)
{
- free(get_client_memptr(wlan_client, i)->p_hdr_info);
+ if(get_client_memptr(wlan_client, i)->p_hdr_info != NULL)
+ {
+ free(get_client_memptr(wlan_client, i)->p_hdr_info);
+ }
}
- free(wlan_client);
+ if(wlan_client != NULL)
+ {
+ free(wlan_client);
+ }
if (tx_prop != NULL)
{
free(tx_prop);