Browse Source

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
Qun Zhang 5 years ago
parent
commit
7ed7929ac0
1 changed files with 1 additions and 0 deletions
  1. 1 0
      components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c

+ 1 - 0
components/fw_offload/dispatcher/src/wlan_fwol_ucfg_api.c

@@ -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);