From e0c65cae259a840a8cd20b81d00f299ab0897a14 Mon Sep 17 00:00:00 2001 From: "Edhar, Mahesh Kumar" Date: Fri, 30 Oct 2015 11:48:42 +0530 Subject: [PATCH] qcacld-3.0: Avoid calling memory allocation function for allocation size 0 qcacld-2.0 to qcacld-3.0 propagation Currently we are calling memory allocation function to allocate memory for FT ies even though FT ies length is 0. Due to above behavior we are seeing unnecessary memory allocation failure error prints. Change made to check for FT ies length before calling memory allocation function. Change-Id: I3f9ddee1d66f51088526f6d370c83697178be925 CRs-Fixed: 930118 --- core/sme/src/csr/csr_api_roam.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 8d74236e35f1..41f33bf50486 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -17922,6 +17922,9 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, pSession->ftSmeContext.reassoc_ft_ies = NULL; } + if (!ft_ies_length) + return; + pSession->ftSmeContext.reassoc_ft_ies = cdf_mem_malloc(ft_ies_length); if (NULL == pSession->ftSmeContext.reassoc_ft_ies) {