diff options
| author | Mingcheng Zhu <mingchen@qca.qualcomm.com> | 2014-11-10 18:39:44 -0800 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2014-11-11 18:37:54 +0530 |
| commit | d159ef7a3aa5c6ae72e77a01403ad0bbaeb16cd4 (patch) | |
| tree | f813a69917b44f9bcd87ccbfe8d5ca30c52cde7f | |
| parent | 4245243106790a655399f5e5554ef1a555cd8cf2 (diff) | |
qcacld-new: Fix HIF memory leak when HIFStart returns error
Fix the memory leak when the HIFStart returns error.
Also a typo in HIF_CE_completion_state memory allocation
is fixed.
Change-Id: Ibe26f4c314711ad7e5e2ace387ff1f9fb3e9eec7
CRs-Fixed: 753596
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/hif_pci.c | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/HIF/PCIe/hif_pci.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c index 3569749e3efe..9062c8c3a852 100644 --- a/CORE/SERVICES/HIF/PCIe/hif_pci.c +++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c @@ -641,7 +641,7 @@ hif_completion_thread_startup(struct HIF_CE_state *hif_state) for (idx = 0; idx < num_list; idx++) { if (completions_needed - allocated_node >= HIF_CE_COMPLETE_STATE_NUM) - num_in_batch = completions_needed - allocated_node; + num_in_batch = HIF_CE_COMPLETE_STATE_NUM; else num_in_batch = completions_needed - allocated_node; if (num_in_batch <= 0) @@ -1721,6 +1721,8 @@ HIFStop(HIF_DEVICE *hif_device) /* sync shutdown */ hif_completion_thread_shutdown(hif_state); hif_completion_thread(hif_state); + } else { + hif_completion_thread_shutdown(hif_state); } /* diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.h b/CORE/SERVICES/HIF/PCIe/hif_pci.h index c4b0036127a7..45dfd56a76f5 100644 --- a/CORE/SERVICES/HIF/PCIe/hif_pci.h +++ b/CORE/SERVICES/HIF/PCIe/hif_pci.h @@ -64,7 +64,7 @@ enum ol_ath_hif_pkt_ecodes { struct HIF_CE_state ; -#define HIF_CE_COMPLETE_STATE_NUM 10 +#define HIF_CE_COMPLETE_STATE_NUM 18 /* 56 * 18 + 4/8 = 1012/1016 bytes */ struct HIF_CE_completion_state_list { struct HIF_CE_completion_state_list *next; }; |
