qcacld-3.0: Release intf addr if failed to open adapter
Release intf addr which is allocated by wlan_hdd_get_intf_addr() if failed to open adapter when try to add new virtual interface. Change-Id: Ifa0f795ca06b15da00f8809a764734e8d0fe288d CRs-Fixed: 2653590
This commit is contained in:
@@ -6183,8 +6183,6 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
|
|||||||
return adapter;
|
return adapter;
|
||||||
|
|
||||||
err_free_netdev:
|
err_free_netdev:
|
||||||
wlan_hdd_release_intf_addr(hdd_ctx, adapter->mac_addr.bytes);
|
|
||||||
|
|
||||||
if (ndev)
|
if (ndev)
|
||||||
free_netdev(ndev);
|
free_netdev(ndev);
|
||||||
|
|
||||||
|
@@ -763,10 +763,13 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
|
|||||||
p2p_device_address.bytes,
|
p2p_device_address.bytes,
|
||||||
name_assign_type, true);
|
name_assign_type, true);
|
||||||
} else {
|
} else {
|
||||||
|
uint8_t *device_address =
|
||||||
|
wlan_hdd_get_intf_addr(hdd_ctx, mode);
|
||||||
adapter = hdd_open_adapter(hdd_ctx, mode, name,
|
adapter = hdd_open_adapter(hdd_ctx, mode, name,
|
||||||
wlan_hdd_get_intf_addr(hdd_ctx,
|
device_address,
|
||||||
mode),
|
|
||||||
name_assign_type, true);
|
name_assign_type, true);
|
||||||
|
if (!adapter)
|
||||||
|
wlan_hdd_release_intf_addr(hdd_ctx, device_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!adapter) {
|
if (!adapter) {
|
||||||
|
Reference in New Issue
Block a user