ソースを参照

qcacld-3.0: Correct NULL pointer check in epping_cookie_init()

Propagate from qcacld-2.0 to qcacld-3.0

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
Yingying Tang 8 年 前
コミット
86492dee0d
1 ファイル変更1 行追加1 行削除
  1. 1 1
      core/utils/epping/src/epping_helper.c

+ 1 - 1
core/utils/epping/src/epping_helper.c

@@ -62,7 +62,7 @@ int epping_cookie_init(epping_context_t *pEpping_ctx)
 		pEpping_ctx->s_cookie_mem[i] =
 			qdf_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(QDF_TRACE_LEVEL_FATAL,
 				   "%s: no mem for cookie (idx = %d)", __func__,
 				   i);