qcacld-3.0: Fix NPD in hdd_send_peer_status_ind_to_app

Fix null pointer dereference in hdd_send_peer_status_ind_to_app
by adding a null pointer check.

Change-Id: I61db1d5f2636fc80459b0c35ca4db73635fe1a50
CRs-Fixed: 2024102
This commit is contained in:
Naveen Rawat 2017-03-23 17:15:38 -07:00 • committed by Sandeep Puligilla
commit 6877a24ed2

View file

@ -2257,6 +2257,13 @@ static inline void hdd_send_peer_status_ind_to_app(
{
struct wifi_pos_ch_info ch_info;
if (!chan_info) {
os_if_wifi_pos_send_peer_status(peer_mac, peer_status,
peer_timing_meas_cap, sessionId,
NULL, dev_mode);
return;
}
ch_info.chan_id = chan_info->chan_id;
ch_info.mhz = chan_info->mhz;
ch_info.band_center_freq1 = chan_info->band_center_freq1;