Explorar o 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 %!s(int64=7) %!d(string=hai) anos
pai
achega
78cb3c231f
Modificáronse 1 ficheiros con 1 adicións e 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