IPACM: Fixes memory leak issue when wlan up/down

For wlan AP/AP+AP mode, with multiple up/down, there
are some memory leak issues on ipacm. The fix is to
free the memory which IPACM allocated on wlan
AP/AP+AP modes.

Change-Id: I0d9f80a49ced2a7e58f98cb44c9bec589392b8c4
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index 3cb41d4..19c6950 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -75,12 +75,15 @@
 	if(iface_query != NULL)
 	{
 
-	eth_client_len = (sizeof(ipa_eth_client)) + (iface_query->num_tx_props * sizeof(eth_client_rt_hdl));
-	eth_client = (ipa_eth_client *)calloc(IPA_MAX_NUM_ETH_CLIENTS, eth_client_len);
-	if (eth_client == NULL)
+	if(IPACM_Iface::ipacmcfg->iface_table[ipa_if_num].if_cat != WLAN_IF)
 	{
-		IPACMERR("unable to allocate memory\n");
-		return;
+		eth_client_len = (sizeof(ipa_eth_client)) + (iface_query->num_tx_props * sizeof(eth_client_rt_hdl));
+		eth_client = (ipa_eth_client *)calloc(IPA_MAX_NUM_ETH_CLIENTS, eth_client_len);
+		if (eth_client == NULL)
+		{
+			IPACMERR("unable to allocate memory\n");
+			return;
+		}
 	}
 
 	IPACMDBG_H(" IPACM->IPACM_Lan(%d) constructor: Tx:%d Rx:%d\n", ipa_if_num,