Selaa lähdekoodia

qcacld-3.0: Make sure NULL vdev is not de-referenced

Do not access vdev_id from vdev structure if vdev ptr is NULL.

Change-Id: I1aafa5ce7398994d55805742e831ca8ee1ae6a21
CRs-Fixed: 2313397
Amar Singhal 6 vuotta sitten
vanhempi
sitoutus
7ef5909b64
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      core/dp/txrx/ol_txrx.c

+ 1 - 2
core/dp/txrx/ol_txrx.c

@@ -2860,8 +2860,7 @@ int ol_txrx_peer_release_ref(ol_txrx_peer_handle peer,
 	vdev = peer->vdev;
 	vdev = peer->vdev;
 	if (NULL == vdev) {
 	if (NULL == vdev) {
 		ol_txrx_err("The vdev is not present anymore\n");
 		ol_txrx_err("The vdev is not present anymore\n");
-		err_code = 0xbad1;
-		goto ERR_STATE;
+		return -EINVAL;
 	}
 	}
 
 
 	pdev = vdev->pdev;
 	pdev = vdev->pdev;