diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-09-09 16:17:37 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-09-06 14:48:31 +0200 |
commit | 82c59084a8bc1241c675d309e5c22f42e633fab5 (patch) | |
tree | d4f90411d3bb7429f0f006590566eaad1a143653 | |
parent | fe25c077e040021a33905ee4dc4edb994b7181ee (diff) |
TRX: Free bust buffer memory to when changing lchan type
-rw-r--r-- | src/osmo-bts-trx/scheduler.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/osmo-bts-trx/scheduler.c b/src/osmo-bts-trx/scheduler.c index 4cf6a683..f4b0d9cc 100644 --- a/src/osmo-bts-trx/scheduler.c +++ b/src/osmo-bts-trx/scheduler.c @@ -2496,6 +2496,15 @@ int trx_sched_set_lchan(struct trx_l1h *l1h, uint8_t chan_nr, uint8_t link_id, if (active) memset(chan_state, 0, sizeof(*chan_state)); chan_state->active = active; + /* free burst memory, to cleanly start with burst 0 */ + if (chan_state->dl_bursts) { + talloc_free(chan_state->dl_bursts); + chan_state->dl_bursts = NULL; + } + if (chan_state->ul_bursts) { + talloc_free(chan_state->ul_bursts); + chan_state->ul_bursts = NULL; + } } } |