wlan: Free assoc responses while doing lim cleanup

In case when tx confirmation for assoc response is not coming
from fw and driver unload happens, all the assoc responses from
the list should be freed while doing lim cleanup. But in
limDestroyAssocRspCompletiontionList(), assoc responses in the
list does not get freed causing memory leak.

Free assoc responses while doing lim cleanup in
limDestroyAssocRspCompletiontionList().

Change-Id: I476a044dcd84b08c6c03ea11ada60e88383e4048
CRs-Fixed: 2188215
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index d8137ff..988eec3 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -712,6 +712,16 @@
 static void
 limDestroyAssocRspCompletiontionList(tpAniSirGlobal pMac)
 {
+    assoc_rsp_tx_context *pAssocRspCtx;
+
+    while(vos_list_remove_front(&pMac->assoc_rsp_completion_list,
+           (vos_list_node_t**)&pAssocRspCtx) == VOS_STATUS_SUCCESS)
+    {
+        VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
+                  FL("Fixing leak! Deallocating pAssocRspCtx node %lu"),
+                      (unsigned long)pAssocRspCtx);
+        vos_mem_free(pAssocRspCtx);
+    }
     vos_list_destroy(&pMac->assoc_rsp_completion_list);
 }