diff options
author | Shihuan Liu <chiaweic@codeaurora.org> | 2017-09-18 17:09:37 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-10-18 11:08:06 -0700 |
commit | ec108dd8cda2f8635cf6fa20c1c98bb341ea6ce6 (patch) | |
tree | 98b16d4d4e6ad712c5b71affec4a79d859c66b78 /ipacm | |
parent | cebbb78d45d2a38d49c0701c997606a7dc6b088d (diff) | |
download | ipacfg-mgr-ec108dd8cda2f8635cf6fa20c1c98bb341ea6ce6.tar.gz |
IPACM: fix ipacm crash issue
Fix ipacm crash issue in Ethernet bridging use case.
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Change-Id: I0ff8951b37cd30bce32ea17de9ee2fd9708b48af
Diffstat (limited to 'ipacm')
-rw-r--r-- | ipacm/src/IPACM_Lan.cpp | 21 | ||||
-rw-r--r-- | ipacm/src/IPACM_LanToLan.cpp | 5 | ||||
-rw-r--r-- | ipacm/src/IPACM_Wlan.cpp | 18 |
3 files changed, 41 insertions, 3 deletions
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp index 8efaf23..e5ff98a 100644 --- a/ipacm/src/IPACM_Lan.cpp +++ b/ipacm/src/IPACM_Lan.cpp @@ -330,6 +330,21 @@ void IPACM_Lan::event_callback(ipa_cm_event_id event, void *param) } } #endif + +#ifdef FEATURE_ETH_BRIDGE_LE + if(rx_prop != NULL) + { + free(rx_prop); + } + if(tx_prop != NULL) + { + free(tx_prop); + } + if(iface_query != NULL) + { + free(iface_query); + } +#endif delete this; } break; @@ -3025,14 +3040,16 @@ fail: IPACMDBG_H("depend Got pipe %d rm index : %d \n", rx_prop->rx[0].src_pipe, IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]); IPACM_Iface::ipacmcfg->DelRmDepend(IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]); IPACMDBG_H("Finished delete dependency \n "); +#ifndef FEATURE_ETH_BRIDGE_LE free(rx_prop); +#endif } if (eth_client != NULL) { free(eth_client); } - +#ifndef FEATURE_ETH_BRIDGE_LE if (tx_prop != NULL) { free(tx_prop); @@ -3041,7 +3058,7 @@ fail: { free(iface_query); } - +#endif is_active = false; post_del_self_evt(); diff --git a/ipacm/src/IPACM_LanToLan.cpp b/ipacm/src/IPACM_LanToLan.cpp index 799dfee..c3369e7 100644 --- a/ipacm/src/IPACM_LanToLan.cpp +++ b/ipacm/src/IPACM_LanToLan.cpp @@ -594,6 +594,7 @@ void IPACM_LanToLan::handle_add_l2tp_vlan_mapping(ipa_ioc_l2tp_vlan_mapping_info list<l2tp_vlan_mapping_info>::iterator it_mapping; list<vlan_iface_info>::iterator it_vlan; list<IPACM_LanToLan_Iface>::iterator it_iface; + IPACM_LanToLan_Iface *l2tp_iface; l2tp_vlan_mapping_info new_mapping; bool has_l2tp_iface = false; @@ -637,6 +638,8 @@ void IPACM_LanToLan::handle_add_l2tp_vlan_mapping(ipa_ioc_l2tp_vlan_mapping_info if(it_iface->set_l2tp_iface(data->vlan_iface_name) == true) { has_l2tp_iface = true; + l2tp_iface = &(*it_iface); + break; } } @@ -651,6 +654,7 @@ void IPACM_LanToLan::handle_add_l2tp_vlan_mapping(ipa_ioc_l2tp_vlan_mapping_info it_iface->handle_l2tp_enable(); } } + l2tp_iface->switch_to_l2tp_iface(); } return; } @@ -1941,7 +1945,6 @@ bool IPACM_LanToLan_Iface::set_l2tp_iface(char *vlan_iface_name) { IPACMDBG_H("This interface is l2tp interface.\n"); m_is_l2tp_iface = true; - switch_to_l2tp_iface(); } } return m_is_l2tp_iface; diff --git a/ipacm/src/IPACM_Wlan.cpp b/ipacm/src/IPACM_Wlan.cpp index ff8fcee..a36f0f9 100644 --- a/ipacm/src/IPACM_Wlan.cpp +++ b/ipacm/src/IPACM_Wlan.cpp @@ -202,6 +202,20 @@ void IPACM_Wlan::event_callback(ipa_cm_event_id event, void *param) IPACMDBG_H("Received IPA_LAN_DELETE_SELF event.\n"); IPACMDBG_H("ipa_WLAN (%s):ipa_index (%d) instance close \n", IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].iface_name, ipa_if_num); +#ifdef FEATURE_ETH_BRIDGE_LE + if(rx_prop != NULL) + { + free(rx_prop); + } + if(tx_prop != NULL) + { + free(tx_prop); + } + if(iface_query != NULL) + { + free(iface_query); + } +#endif delete this; } break; @@ -1926,7 +1940,9 @@ fail: IPACMDBG_H("dev %s add producer dependency\n", dev_name); IPACMDBG_H("depend Got pipe %d rm index : %d \n", rx_prop->rx[0].src_pipe, IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]); IPACM_Iface::ipacmcfg->DelRmDepend(IPACM_Iface::ipacmcfg->ipa_client_rm_map_tbl[rx_prop->rx[0].src_pipe]); +#ifndef FEATURE_ETH_BRIDGE_LE free(rx_prop); +#endif } for (i = 0; i < num_wifi_client; i++) @@ -1940,6 +1956,7 @@ fail: { free(wlan_client); } +#ifndef FEATURE_ETH_BRIDGE_LE if (tx_prop != NULL) { free(tx_prop); @@ -1949,6 +1966,7 @@ fail: { free(iface_query); } +#endif is_active = false; post_del_self_evt(); |