Bladeren bron

qcacmn: Add NULL check for 'pl_dev'

Currently 'pl_dev' is dereferenced without check for NULL in
get_pktlog_handle function in pktlog_internal.c.
To address this issue add NULL check before dereferencing.

Change-Id: I7017560d5eb36df3ca0a547cf62451f339f5940b
CRs-Fixed: 2280047
Jiachao Wu 6 jaren geleden
bovenliggende
commit
72eeed89e5
1 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. 6 1
      utils/pktlog/pktlog_internal.c

+ 6 - 1
utils/pktlog/pktlog_internal.c

@@ -473,7 +473,12 @@ A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
 		return A_ERROR;
 	}
 
-	qdf_assert(pl_dev);
+	if (!pl_dev) {
+		pr_err("Invalid pktlog handle in %s\n", __func__);
+		qdf_assert(pl_dev);
+		return A_ERROR;
+	}
+
 	qdf_assert(data);
 
 	fw_data = (struct ol_fw_data *)data;