osmo-bts-trx: fix a memleak in trx_sched_set_lchan()

An additional burst buffer is allocated in rx_data_fn() for Uplink
SACCH repetition, but unlike the main buffer it never gets free()d.

Change-Id: I93310e7aed91a49c0511e2ed30e000440617f95a
Fixes: I7e4cc33cc010866e41e3b594351a7f7bf93e08ac
Related: OS#4795, SYS#5114
This commit is contained in:
Vadim Yanitskiy 2021-12-12 19:02:33 +03:00
parent 487feeb0ff
commit 7ce4fa4325
1 changed files with 4 additions and 0 deletions

View File

@ -1109,6 +1109,10 @@ int trx_sched_set_lchan(struct gsm_lchan *lchan, uint8_t chan_nr, uint8_t link_i
talloc_free(chan_state->ul_bursts);
chan_state->ul_bursts = NULL;
}
if (chan_state->ul_bursts_prev) {
talloc_free(chan_state->ul_bursts_prev);
chan_state->ul_bursts_prev = NULL;
}
if (active) {
/* Clean up everything */