Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e2fba96 authored by Alok Kumar's avatar Alok Kumar
Browse files

qcacld-3.0: Release Iface address for P2P before delete

If packet capture mode is enabled, P2P Iface is deleted
before creating virtual monitor Iface. Here, Mac address
is not released before P2P adapter delete.

Release the Iface address before deleting P2P adapter to
avoid leak in Mac address.

Change-Id: I32919d96ed85c3d82c4c593877a72317d5f8f3a7
CRs-Fixed: 2523361
parent 00736f13
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -9354,8 +9354,6 @@ wlan_hdd_add_monitor_check(hdd_context_t *hdd_ctx, hdd_adapter_t **adapter,
	hdd_adapter_t *mon_adapter;
	uint32_t mode;

	*adapter = NULL;

	if (!cds_get_pktcap_mode_enable())
		return 0;

@@ -9400,9 +9398,13 @@ wlan_hdd_add_monitor_check(hdd_context_t *hdd_ctx, hdd_adapter_t **adapter,
			continue;

		adapter = hdd_get_adapter(hdd_ctx, mode);
		if (adapter)
		if (adapter) {
			wlan_hdd_release_intf_addr(
					hdd_ctx,
					adapter->macAddressCurrent.bytes);
			hdd_close_adapter(hdd_ctx, adapter, rtnl_held);
		}
	}

	mon_adapter = hdd_open_adapter(hdd_ctx, QDF_MONITOR_MODE, name,
				       wlan_hdd_get_intf_addr(
+1 −0
Original line number Diff line number Diff line
@@ -2974,6 +2974,7 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
		}
	}

	pAdapter = NULL;
	ret = wlan_hdd_add_monitor_check(pHddCtx, &pAdapter, type, name,
					 true, name_assign_type);
	if (ret)