Add a check to validate hdd adapter to avoid NULL pointer dereference. Change-Id: I06d883c213e10b620d8af3f61baaeb483b078bf1 CRs-Fixed: 2240482
@@ -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) {