Browse Source

qcacld-3.0: Avoid NULL pointer access in function wma_send_bcn_buf_ll

In function wma_send_bcn_buf_ll, bcn info is filled from
wma handle by mapping the vdev id. For valid vdev id also wma_handle
could have NULL beacon info. So, check for NULL pointer before
accessing the bcn pointer.

Change-Id: I660c8231801eb28962edc364a139e7980febb71e
CRs-Fixed: 2336946
Bala Venkatesh 6 years ago
parent
commit
d267bf8de4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/wma/src/wma_mgmt.c

+ 1 - 1
core/wma/src/wma_mgmt.c

@@ -103,7 +103,7 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
 	uint8_t i;
 
 	bcn = wma->interfaces[vdev_id].beacon;
-	if (!bcn->buf) {
+	if (!bcn || !bcn->buf) {
 		WMA_LOGE("%s: Invalid beacon buffer", __func__);
 		return;
 	}