summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingying Tang <yintang@qti.qualcomm.com>2016-03-04 18:23:32 +0800
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-24 13:35:25 +0530
commit373b46cf87e50188abbac90becf7d2855fb8e062 (patch)
treeed5b3a0674240a97b2e8f676ea967aada080e743
parent6ddac772b7b1462ab27425ef7e63280a4e5b1210 (diff)
qcacld-2.0: Correct NULL pointer check in epping_cookie_init()
Currently in epping_cookie_init() when the cookie array is allocated the wrong pointer is checked for a NULL allocation. Update the function to check the correct pointer. Change-Id: I56384197a8729996d7aa87d3c51903525b3be93c CRs-Fixed: 979671
-rw-r--r--CORE/EPPING/src/epping_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/CORE/EPPING/src/epping_helper.c b/CORE/EPPING/src/epping_helper.c
index d8787e5eaa67..59ab7986cbb9 100644
--- a/CORE/EPPING/src/epping_helper.c
+++ b/CORE/EPPING/src/epping_helper.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -72,7 +72,7 @@ int epping_cookie_init(epping_context_t*pEpping_ctx)
for (i = 0; i < MAX_COOKIE_SLOTS_NUM; i++) {
pEpping_ctx->s_cookie_mem[i] =
vos_mem_malloc(sizeof(struct epping_cookie)*MAX_COOKIE_SLOT_SIZE);
- if (pEpping_ctx->s_cookie_mem == NULL) {
+ if (pEpping_ctx->s_cookie_mem[i] == NULL) {
EPPING_LOG(VOS_TRACE_LEVEL_FATAL,
"%s: no mem for cookie (idx = %d)", __func__, i);
goto error;