diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-08-01 00:24:19 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-08-01 00:27:37 +0200 |
commit | f92e44c5399d8914aad58bd2c74005b3640c5a9d (patch) | |
tree | 0add0cd58c448818b33a18a95e48fb53446038c7 /src | |
parent | 881dcaf7aa262e3c14c104e49e65cd2ee3bf93c3 (diff) |
lapd_core: Fix crash in lapd_dl_flush_hist()
When lapd_dl_flush_hist() was called before we actually had started a
transmit history from lapd_dl_init(), we woul segfault before this
patch.
Change-Id: Ifa677c9b335dd2884b4f3e44699d901957a0500b
Diffstat (limited to 'src')
-rw-r--r-- | src/gsm/lapd_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index fd1e7097..fd163c83 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -158,7 +158,7 @@ static void lapd_dl_flush_hist(struct lapd_datalink *dl) { unsigned int i; - if (!dl->range_hist) + if (!dl->range_hist || !dl->tx_hist) return; for (i = 0; i < dl->range_hist; i++) { |