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
This commit is contained in:
bings 2018-07-05 14:01:53 +08:00 • committed by nshrivas
commit 6fb9bf69d3

View file

@ -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);
}
}