Browse Source

qcacld-3.0: Add NULL check for a pointer before dereferencing

Added NULL check before dereferencing txrx node pointer.

Change-Id: I6f136a9a850d251909d5292ef144b3bd0e251dd2
CRs-Fixed: 3300025
Gangadhar Kavalastramath 2 years ago
parent
commit
5feb595ea3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/wma/src/wma_data.c

+ 1 - 1
core/wma/src/wma_data.c

@@ -2676,7 +2676,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen,
 	mgmt_param.use_6mbps = use_6mbps;
 	mgmt_param.tx_type = tx_frm_index;
 	mgmt_param.peer_rssi = peer_rssi;
-	if (wlan_vdev_mlme_get_opmode(iface->vdev) == QDF_STA_MODE &&
+	if (iface && wlan_vdev_mlme_get_opmode(iface->vdev) == QDF_STA_MODE &&
 	    wlan_vdev_mlme_is_mlo_vdev(iface->vdev) &&
 	    frmType == TXRX_FRM_802_11_MGMT &&
 	    pFc->subType != SIR_MAC_MGMT_PROBE_REQ &&