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
This commit is contained in:
Vadim Yanitskiy 2021-06-02 20:08:04 +02:00 committed by laforge
parent f6716bf846
commit 5b8080208a
1 changed files with 2 additions and 2 deletions

View File

@ -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)