From 9f54c6ae6d1683187226f96a10fc9624a9083a34 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 7 Apr 2021 16:41:02 +0200 Subject: [PATCH] Fix NR PUCCH info string and memory leak --- lib/src/phy/phch/pucch_nr.c | 10 +++++----- lib/src/phy/ue/ue_ul_nr.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/src/phy/phch/pucch_nr.c b/lib/src/phy/phch/pucch_nr.c index 81a907723..cba565583 100644 --- a/lib/src/phy/phch/pucch_nr.c +++ b/lib/src/phy/phch/pucch_nr.c @@ -732,7 +732,7 @@ static uint32_t pucch_nr_resource_info(const srsran_pucch_nr_resource_t* r, char len = srsran_print_check(str, str_len, len, - "f=%d, prb=%d:%d, symb=%d:%d", + "f=%d prb=%d:%d symb=%d:%d ", (int)r->format, r->starting_prb, nof_prb, @@ -740,19 +740,19 @@ static uint32_t pucch_nr_resource_info(const srsran_pucch_nr_resource_t* r, char r->nof_symbols); if (r->intra_slot_hopping) { - len = srsran_print_check(str, str_len, len, ", hop=%d", r->second_hop_prb); + len = srsran_print_check(str, str_len, len, "hop=%d ", r->second_hop_prb); } if (r->format == SRSRAN_PUCCH_NR_FORMAT_0 || r->format == SRSRAN_PUCCH_NR_FORMAT_1) { - len = srsran_print_check(str, str_len, len, ", cs=%d", r->initial_cyclic_shift); + len = srsran_print_check(str, str_len, len, "cs=%d ", r->initial_cyclic_shift); } if (r->format == SRSRAN_PUCCH_NR_FORMAT_1) { - len = srsran_print_check(str, str_len, len, ", occ=%d", r->time_domain_occ); + len = srsran_print_check(str, str_len, len, "occ=%d ", r->time_domain_occ); } if (r->format == SRSRAN_PUCCH_NR_FORMAT_4) { - len = srsran_print_check(str, str_len, len, ", occ=%d:%d", r->occ_index, r->occ_lenth); + len = srsran_print_check(str, str_len, len, "occ=%d:%d ", r->occ_index, r->occ_lenth); } return len; diff --git a/lib/src/phy/ue/ue_ul_nr.c b/lib/src/phy/ue/ue_ul_nr.c index 146b297c0..74b313828 100644 --- a/lib/src/phy/ue/ue_ul_nr.c +++ b/lib/src/phy/ue/ue_ul_nr.c @@ -224,6 +224,7 @@ void srsran_ue_ul_nr_free(srsran_ue_ul_nr_t* q) if (q->sf_symbols[0] != NULL) { free(q->sf_symbols[0]); } + srsran_pucch_nr_free(&q->pucch); srsran_pusch_nr_free(&q->pusch); srsran_dmrs_sch_free(&q->dmrs);