Browse Source

qcacld-3.0: Check txrx_vdev before calling cdp_fc_vdev_flush

When txrx_vdev is NULL, zero address access happens if cdp_fc_vdev_flush
is called.

Before calling cdp_fc_vdev_flush, make sure txrx_vdev is not NULL.

Change-Id: I13b52bd3f2fb5e7db6150c8bf645c5bec703bc2b
CRs-Fixed: 2272005
bings 6 years ago
parent
commit
6fb9bf69d3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/hdd/src/wlan_hdd_main.c

+ 3 - 1
core/hdd/src/wlan_hdd_main.c

@@ -2128,7 +2128,9 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
 				true;
 			hdd_info("tx blocked for session: %d",
 				adapter->session_id);
-			cdp_fc_vdev_flush(cds_get_context(QDF_MODULE_ID_SOC),
+			if (adapter->txrx_vdev)
+				cdp_fc_vdev_flush(
+					cds_get_context(QDF_MODULE_ID_SOC),
 					adapter->txrx_vdev);
 		}
 	}