Parcourir la source

qcacld-3.0: Initialize stack variable before use

A possible case of accessing @peer variable
uninitialized in wlan_hdd_add_key_all_mlo_vdev() API
when the device mode is SAP but the VDEV is not MLO type.

Initialize the variable to default value to fix the issue.

Change-Id: Ie35333e581cadb7d5e269bc12a52ecbf7260aece
CRs-Fixed: 3341891
Vinod Kumar Pirla il y a 2 ans
Parent
commit
e0a52aadcd
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -20777,9 +20777,9 @@ static int wlan_hdd_add_key_all_mlo_vdev(mac_handle_t mac_handle,
 	struct hdd_adapter *link_adapter;
 	struct hdd_context *hdd_ctx;
 	struct wlan_objmgr_vdev *wlan_vdev_list[WLAN_UMAC_MLO_MAX_VDEVS];
-	struct wlan_objmgr_peer *peer;
 	struct wlan_objmgr_vdev *link_vdev;
 	struct qdf_mac_addr peer_mac;
+	struct wlan_objmgr_peer *peer = NULL;
 	int errno = 0;
 	uint16_t link, vdev_count = 0;