From b96e33ffd6af5a352630c5283da9cd250f3d8ef7 Mon Sep 17 00:00:00 2001 From: ismagom Date: Tue, 18 Nov 2014 17:11:56 +0100 Subject: [PATCH] Fixed memory leak with pdsch_set_rnti() --- lte/examples/pdsch_ue.c | 4 ++++ lte/phy/lib/ue/src/ue_dl.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lte/examples/pdsch_ue.c b/lte/examples/pdsch_ue.c index 39430574e..0701e6fa9 100644 --- a/lte/examples/pdsch_ue.c +++ b/lte/examples/pdsch_ue.c @@ -206,6 +206,10 @@ int main(int argc, char **argv) { fprintf(stderr, "Error initaiting UE MIB decoder\n"); exit(-1); } + + pdsch_set_rnti(&ue_dl.pdsch, prog_args.rnti); // This is the RNTI we want to look for + + /* Initialize subframe counter */ sf_cnt = 0; diff --git a/lte/phy/lib/ue/src/ue_dl.c b/lte/phy/lib/ue/src/ue_dl.c index 7826b503c..5b15e3f7c 100644 --- a/lte/phy/lib/ue/src/ue_dl.c +++ b/lte/phy/lib/ue/src/ue_dl.c @@ -241,8 +241,6 @@ int ue_dl_decode(ue_dl_t *q, cf_t *input, uint8_t *data, uint32_t sf_idx, uint32 } if (q->harq_process[0].mcs.mod > 0) { - pdsch_set_rnti(&q->pdsch, rnti); - ret = pdsch_decode(&q->pdsch, q->sf_symbols, q->ce, chest_dl_get_noise_estimate(&q->chest), data, sf_idx, &q->harq_process[0], rvidx); if (ret == LIBLTE_ERROR) {