qcacld-3.0: Fix NPD in function lim_create_fils_wrapper_data
Fix NPD in function lim_create_fils_wrapper_data, by moving the check against NULL pointer before the access. Change-Id: I00c6c4df0ff94ffdfe77a8a563b1747c29906b2f CRs-Fixed: 2232734
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
a71e3a9779
commit
5259c23657
@@ -863,7 +863,12 @@ static int lim_create_fils_wrapper_data(struct pe_fils_session *fils_info)
|
||||
uint8_t auth_tag[FILS_AUTH_TAG_MAX_LENGTH] = {0};
|
||||
uint32_t length = 0;
|
||||
QDF_STATUS status;
|
||||
int buf_len =
|
||||
int buf_len;
|
||||
|
||||
if (!fils_info)
|
||||
return 0;
|
||||
|
||||
buf_len =
|
||||
/* code + identifier */
|
||||
sizeof(uint8_t) * 2 +
|
||||
/* length */
|
||||
@@ -877,9 +882,6 @@ static int lim_create_fils_wrapper_data(struct pe_fils_session *fils_info)
|
||||
/* cryptosuite + auth_tag */
|
||||
sizeof(uint8_t) + lim_get_auth_tag_len(HMAC_SHA256_128);
|
||||
|
||||
if (!fils_info)
|
||||
return 0;
|
||||
|
||||
fils_info->fils_erp_reauth_pkt = qdf_mem_malloc(buf_len);
|
||||
if (!fils_info->fils_erp_reauth_pkt) {
|
||||
pe_err("failed to allocate memory");
|
||||
|
Reference in New Issue
Block a user