diff options
| author | Ganesh Kondabattini <ganeshk@codeaurora.org> | 2016-11-03 17:31:16 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-07 11:24:29 -0800 |
| commit | 38d20b3a68ccb8ba98545bcc5cb3e8ef67b1202b (patch) | |
| tree | fb7b9b4b4e5d6d59e482ec34e0d9de5ccd3b7dc3 | |
| parent | 4e0f790b47aba662a8136720a2dd4645e92c8d13 (diff) | |
qcacld-3.0: validate the green_ap_ctx before accessing it
qcacld-2.0 to qcacld-3.0 propagation
The green_ap_ctx is not checked for NULL pointer before accessing
it. This is leading to crash in FTM mode as green_ap_ctx is not
initialized.
CRs-Fixed: 1074982
Change-Id: I6b3cea999bfb44cfb6fa56aece6b423e638bfaa7
| -rw-r--r-- | core/hdd/src/wlan_hdd_green_ap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c index 01afbd5a178a..e87c90c18823 100644 --- a/core/hdd/src/wlan_hdd_green_ap.c +++ b/core/hdd/src/wlan_hdd_green_ap.c @@ -399,6 +399,11 @@ void hdd_green_ap_start_bss(struct hdd_context_s *hdd_ctx) { struct hdd_config *cfg = hdd_ctx->config; + if (!hdd_ctx->green_ap_ctx) { + hdd_err("Green AP is not enabled. green_ap_ctx = NULL"); + goto exit; + } + /* check if the firmware and ini are both enabled the egap, * and also the feature_flag enable, then we enable the egap */ |
