Explorar el Código

qcacld-3.0: Fix a memory leak during driver init

When WMI attaching fails in wma_open, the memory allocated
during invokation of target_if_open should be freed to
avoid a memory leak.

Change-Id: I64e5bbc9714199a1598df55e00586786a30aad35
CRs-fixed: 2237068
wadesong hace 7 años
padre
commit
78cb3c231f
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      core/wma/src/wma_main.c

+ 1 - 0
core/wma/src/wma_main.c

@@ -3584,6 +3584,7 @@ err_scn_context:
 	OS_FREE(wmi_handle);
 
 err_wma_handle:
+	target_if_close();
 	target_if_free_psoc_tgt_info(psoc);
 	if (cds_get_conparam() != QDF_GLOBAL_FTM_MODE) {
 #ifdef FEATURE_WLAN_EXTSCAN