aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/phy_link.h
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-05-19 15:52:07 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-05-19 16:53:06 +0200
commit6ad89f2f5808f33732904e5d9774307586cbf5a5 (patch)
tree4c40081ffd6787ddce6d284a35e5837881bc1015 /include/osmo-bts/phy_link.h
parentdd9a6f16bc0427839b2619ddcf7d736f2cb5954d (diff)
osmo-bts-{trx,virtual}: fix: pinst->trx may be NULL
We assume that it's legal to have dangling PHY instances that are not associated with any TRX instances in the configuration file. Obviously, such PHY instances have pinst->trx set to NULL. The DSP based models seem to handle dangling PHY instances without any problems, so let's ensure that we always check pinst->trx against NULL in the osmo-bts-{trx,virtual} specific code. Change-Id: Ib7d9cb7ae47fead723fa46454cd64bf6e88756bb Fixes: CID#236092 "Dereference before null check"
Diffstat (limited to 'include/osmo-bts/phy_link.h')
-rw-r--r--include/osmo-bts/phy_link.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index c4b60f36..becc4421 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -97,7 +97,7 @@ struct phy_instance {
struct phy_link *phy_link;
/* back-pointer to the TRX to which we're associated */
- struct gsm_bts_trx *trx;
+ struct gsm_bts_trx *trx; /* NOTE: may be NULL! */
union {
struct {