qcacld-3.0: Add Null pointer check for packet buffer
Add Null pointer check for packet buffer before dereference it in lim_send_addba_response_frame() API. Change-Id: I46c637b7534fe200ec586b07e34d9a4baee5ac7e CRs-Fixed: 2232740
This commit is contained in:

committad av
nshrivas

förälder
6522ea5601
incheckning
39cec0833b
@@ -4737,7 +4737,7 @@ QDF_STATUS lim_send_addba_response_frame(tpAniSirGlobal mac_ctx,
|
|||||||
uint8_t *frame_ptr;
|
uint8_t *frame_ptr;
|
||||||
tpSirMacMgmtHdr mgmt_hdr;
|
tpSirMacMgmtHdr mgmt_hdr;
|
||||||
uint32_t num_bytes, payload_size, status;
|
uint32_t num_bytes, payload_size, status;
|
||||||
void *pkt_ptr;
|
void *pkt_ptr = NULL;
|
||||||
QDF_STATUS qdf_status;
|
QDF_STATUS qdf_status;
|
||||||
uint8_t tx_flag = 0;
|
uint8_t tx_flag = 0;
|
||||||
uint8_t sme_sessionid = 0;
|
uint8_t sme_sessionid = 0;
|
||||||
@@ -4820,7 +4820,7 @@ QDF_STATUS lim_send_addba_response_frame(tpAniSirGlobal mac_ctx,
|
|||||||
num_bytes = payload_size + sizeof(*mgmt_hdr);
|
num_bytes = payload_size + sizeof(*mgmt_hdr);
|
||||||
qdf_status = cds_packet_alloc(num_bytes, (void **)&frame_ptr,
|
qdf_status = cds_packet_alloc(num_bytes, (void **)&frame_ptr,
|
||||||
(void **)&pkt_ptr);
|
(void **)&pkt_ptr);
|
||||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
if (!QDF_IS_STATUS_SUCCESS(qdf_status) || (!pkt_ptr)) {
|
||||||
pe_err("Failed to allocate %d bytes for a ADDBA response action frame",
|
pe_err("Failed to allocate %d bytes for a ADDBA response action frame",
|
||||||
num_bytes);
|
num_bytes);
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
Referens i nytt ärende
Block a user