qcacld-3.0: Proper mem allocation for lim, pre auth timers

This is qcacld-2.0 to qcacld-3.0 propagation.

Fix mem alloc for pre auth timer and add error handling for limInitMlm.

Currently number of preauth timer is taken as cfg param and memory is
allocated in bulk. In case the memory allocation fails, no error is
returned from limInitMlm, which causes undefined behavior. Also preauth
timers do not need contiguous memory allocation, so allocate an array of
pointers instead of single chunk for pre auth timers.

Change-Id: I92677aa9bb7970034630f4c6487fa9d196ccfb4c
CRs-Fixed: 955557
diff --git a/core/mac/src/pe/include/lim_global.h b/core/mac/src/pe/include/lim_global.h
index 4a98ad3..336a0e8 100644
--- a/core/mac/src/pe/include/lim_global.h
+++ b/core/mac/src/pe/include/lim_global.h
@@ -330,7 +330,7 @@
 /* Pre-authentication table definition */
 typedef struct tLimPreAuthTable {
 	uint32_t numEntry;
-	tpLimPreAuthNode pTable;
+	tLimPreAuthNode **pTable;
 } tLimPreAuthTable, *tpLimPreAuthTable;
 
 /* / Per STA context structure definition */