From 7069dfc051d5096e9614a17234646a186de290c9 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 1 Dec 2019 18:59:04 +0700 Subject: trxcon/sched_trx.c: fix potential NULL-pointer dereference Change-Id: If1ecd9f5a70fa448327c62d38d76c8443b939248 --- src/host/trxcon/sched_trx.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3