qcacld-3.0: Add null check for logging PMKSA BSSID

When wlan_hdd_del_mksa_cache is not successful, it prints a failure
message with the PMKSA BSSID without checking whether it is null,
causing it to access a null pointer. Add a null check for PMKSA BSSID
using it in the log.

Change-Id: I7c2f67fe709c61d5371635950021cb8687175245
CRs-Fixed: 2621607
This commit is contained in:
Alan Chen 2020-02-13 11:09:23 -08:00 • committed by nshrivas
commit 33628529ff

View file

@ -21417,8 +21417,11 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy,
/* Delete the PMKID CSR cache */
if (QDF_STATUS_SUCCESS !=
wlan_hdd_del_pmksa_cache(adapter, pmk_cache)) {
hdd_err("Failed to delete PMKSA for " QDF_MAC_ADDR_STR,
QDF_MAC_ADDR_ARRAY(pmksa->bssid));
if (!pmksa->bssid)
hdd_err("Failed to delete PMKSA for null bssid");
else
hdd_err("Failed to delete PMKSA for " QDF_MAC_ADDR_STR,
QDF_MAC_ADDR_ARRAY(pmksa->bssid));
status = -EINVAL;
}