qcacld-3.0: Make sure pointer wasn't dereferenced after being freed

Make sure pointer wasn't dereferenced after being freed, so when
fwol_obj is freed, the function should return directly.

Change-Id: I69c23d2366b2ea0ff1caca9798bdc22063221a9c
CRs-Fixed: 2642567
This commit is contained in:
Qun Zhang
2020-03-16 21:56:17 +08:00
committed by nshrivas
parent d381f6c338
commit 7ed7929ac0

View File

@@ -72,6 +72,7 @@ fwol_psoc_object_created_notification(struct wlan_objmgr_psoc *psoc, void *arg)
if (QDF_IS_STATUS_ERROR(status)) {
fwol_err("Failed to attach psoc_ctx with psoc");
qdf_mem_free(fwol_obj);
return status;
}
tgt_fwol_register_rx_ops(&fwol_obj->rx_ops);