Fix the memory leaks observed in static source code analysis

Resolves the memory leaks observed in static source code analysis.
And remove the csrStop routine call in csrClose function as csrStop
is already called in smeStop routine during the driver unload. Calling
csrStop in csrClose routine leads to memory leak during the driver
unload as csrStop posts message to PE and the message will not be
processed since the scheduler is already closed in the unload process.

Change-Id: I105f03c1ae3d006b0bc1bf37ab3dbd6a680fb658
CRs-Fixed: 507819
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index b1b4d25..f6f2b6e 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1102,6 +1102,7 @@
     {
         limLog(pMac, LOGE,
                 FL("Invalid value (%d) for numSsid"), SIR_SCAN_MAX_NUM_SSID);
+        palFreeMemory(pMac->hHdd, (void *)pScanOffloadReq);
         return eHAL_STATUS_FAILURE;
     }