diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-09-09 16:17:37 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2014-01-21 15:54:55 +0100 |
commit | e74d202d4d5b9a14f14df0f1f69a0be85f2873ba (patch) | |
tree | b23fa24d30e1cc7cbf972f56d124ed1521d43181 | |
parent | 7b7fd48e383ec4bd0bd6efe83224f53a68335fab (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; + } } } |