wayne: ipacm: Fix memory leaks
* Errors reported by CppCheck. Change-Id: I700e4c8ef6a4cb7f551e1d9c69f72d218b124dde
This commit is contained in:
parent
2fdf20b62c
commit
f2aa710e36
3 changed files with 7 additions and 4 deletions
|
@ -5437,6 +5437,7 @@ int IPACM_Lan::add_l2tp_flt_rule(ipa_ip_type iptype, uint8_t *dst_mac, uint32_t
|
||||||
if(m_routing.GetRoutingTable(&rt_tbl) == false)
|
if(m_routing.GetRoutingTable(&rt_tbl) == false)
|
||||||
{
|
{
|
||||||
IPACMERR("Failed to get routing table.\n");
|
IPACMERR("Failed to get routing table.\n");
|
||||||
|
free(pFilteringTable);
|
||||||
return IPACM_FAILURE;
|
return IPACM_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -408,6 +408,7 @@ void* ipa_driver_msg_notifier(void *param)
|
||||||
if (data_ex == NULL)
|
if (data_ex == NULL)
|
||||||
{
|
{
|
||||||
IPACMERR("unable to allocate memory for event data\n");
|
IPACMERR("unable to allocate memory for event data\n");
|
||||||
|
free(event_ex);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
data_ex->num_of_attribs = event_ex->num_of_attribs;
|
data_ex->num_of_attribs = event_ex->num_of_attribs;
|
||||||
|
|
|
@ -708,6 +708,7 @@ static int ipa_nl_decode_nlmsg
|
||||||
if(ret_val != IPACM_SUCCESS)
|
if(ret_val != IPACM_SUCCESS)
|
||||||
{
|
{
|
||||||
IPACMERR("Error while getting interface name\n");
|
IPACMERR("Error while getting interface name\n");
|
||||||
|
free(data_fid);
|
||||||
return IPACM_FAILURE;
|
return IPACM_FAILURE;
|
||||||
}
|
}
|
||||||
IPACMDBG("Got a usb link_up event (Interface %s, %d) \n", dev_name, msg_ptr->nl_link_info.metainfo.ifi_index);
|
IPACMDBG("Got a usb link_up event (Interface %s, %d) \n", dev_name, msg_ptr->nl_link_info.metainfo.ifi_index);
|
||||||
|
|
Loading…
Reference in a new issue