summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-12-01 18:59:04 +0700
committerfixeria <axilirator@gmail.com>2019-12-01 13:11:42 +0000
commit7069dfc051d5096e9614a17234646a186de290c9 (patch)
tree2712a15ee38472a97c0245c523aea39ced4332da
parent0356e565721d53d4e598b1c6ae7f15f9a89c89b5 (diff)
trxcon/sched_trx.c: fix potential NULL-pointer dereference
-rw-r--r--src/host/trxcon/sched_trx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index 37d1acf6..eb6f3dc0 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -264,6 +264,8 @@ int sched_trx_configure_ts(struct trx_instance *trx, int tn,
/* Choose proper multiframe layout */
ts->mf_layout = sched_mframe_layout(config, tn);
+ if (!ts->mf_layout)
+ return -EINVAL;
if (ts->mf_layout->chan_config != config)
return -EINVAL;