qcacld-3.0: Avoid NULL pointer access in apf read memory cb

Add a check to validate hdd adapter to avoid NULL pointer
dereference.

Change-Id: I06d883c213e10b620d8af3f61baaeb483b078bf1
CRs-Fixed: 2240482
This commit is contained in:
Ashish Kumar Dhanotiya 2018-05-11 14:43:10 +05:30 • committed by nshrivas
commit 04cc7c2128

View file

@ -452,6 +452,8 @@ hdd_apf_read_memory_callback(void *hdd_context,
}
adapter = hdd_get_adapter_by_vdev(hdd_ctx, evt->vdev_id);
if (hdd_validate_adapter(adapter))
return;
context = &adapter->apf_context;
if (context->magic != APF_CONTEXT_MAGIC) {