summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/trx_if.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-06-08 15:46:44 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commit65664d088d3d2b30d108ca0b1b8b2f0244d0d7e4 (patch)
treeded8b95d6cdd106508d5d0336b7512a644033fcd /src/host/trxcon/trx_if.c
parent48f2cb4b3b94000647358ddd7d06edbb55495bba (diff)
host/trxcon: fix NULL-pointer deference
Diffstat (limited to 'src/host/trxcon/trx_if.c')
-rw-r--r--src/host/trxcon/trx_if.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 06071679..9ae49006 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -592,6 +592,10 @@ static void trx_if_flush_ctrl(struct trx_instance *trx)
void trx_if_close(struct trx_instance *trx)
{
+ /* May be unallocated due to init error */
+ if (!trx)
+ return;
+
LOGP(DTRX, LOGL_NOTICE, "Shutdown transceiver interface\n");
/* Flush CTRL message list */