summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/sched_trx.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-07-28 15:00:40 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commit6aa6690277e4a1551ed6c6b8482e513253d6865b (patch)
treeed689dd98cc21ea477606bdc189552b0a68dd306 /src/host/trxcon/sched_trx.c
parentc045bc4fbefc2dd1bd9e45cd21ebd50740700c3e (diff)
host/trxcon/scheduler: fix possible NULL deference
We should make sure that required timeslot is not only allocated, but also configured, i.e. has a correct multiframe layout. Change-Id: I1d0b870c389802b51c709d089b80ac3fb3565fa8
Diffstat (limited to 'src/host/trxcon/sched_trx.c')
-rw-r--r--src/host/trxcon/sched_trx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index 3e615825..cf05bb66 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -423,9 +423,9 @@ int sched_trx_handle_rx_burst(struct trx_instance *trx, uint8_t tn,
uint32_t fn, elapsed;
uint8_t offset, bid;
- /* Check whether required timeslot is enabled / configured */
+ /* Check whether required timeslot is allocated and configured */
ts = sched_trx_find_ts(trx, tn);
- if (ts == NULL) {
+ if (ts == NULL || ts->mf_layout == NULL) {
LOGP(DSCH, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, "
"ignoring burst...\n", tn);
return -EINVAL;