aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-02 20:08:04 +0200
committerlaforge <laforge@osmocom.org>2021-06-04 20:06:58 +0000
commit5b8080208ad150c2892f6fccaba8bc91ddd8320f (patch)
tree1ff891a11679c05d40cf632dc62062ce635744f5
parentf6716bf846f9a84b24357223d06d86bbece087eb (diff)
osmo-bts-trx: fix NULL pointer dereference in trx_if_send_burst()
Starting from TRXDv2 [1], trx_if_send_burst() would keep batching PDUs to the static buffer, unless it's called with br = NULL, so we cannot dereference br in the logging statement. Of course, we could also store TDMA frame number in a static variable, but I don't think it's worth it just for logging. Change-Id: I4a361777fc40bdedcebbe54df6274bc5573f77a8 Fixes: [1] I9b4cc8e10cd683b28d22e32890569484cd20372d Fixes: CID#236232
-rw-r--r--src/osmo-bts-trx/trx_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index c10a15fa..afd630f0 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -1154,8 +1154,8 @@ int trx_if_send_burst(struct trx_l1h *l1h, const struct trx_dl_burst_req *br)
sendall:
LOGPPHI(l1h->phy_inst, DTRX, LOGL_DEBUG,
- "Tx TRXDv%u datagram with %u PDU(s): fn=%u\n",
- pdu_ver, pdu_num, br->fn);
+ "Tx TRXDv%u datagram with %u PDU(s)\n",
+ pdu_ver, pdu_num);
/* TRXDv2: unset BATCH.ind in the last PDU */
if (pdu_ver >= 2)