Fix RRC serving cell leak

This commit is contained in:
Ismael Gomez 2019-07-12 13:59:43 +02:00
parent 7e1ae45d58
commit 154b9a84c8
1 changed files with 3 additions and 0 deletions

View File

@ -997,6 +997,9 @@ void rrc::set_serving_cell(uint32_t cell_idx) {
if (!add_neighbour_cell(serving_cell)) {
rrc_log->info("Serving cell not added to list of neighbours. Worse than current neighbours\n");
}
} else {
// Do not leak it if we are not adding to neighbour list
delete serving_cell;
}
// Set new serving cell