From f571043da83d4de349d8a685fe47bf97dbd4e54c Mon Sep 17 00:00:00 2001
From: Teodora <teodora.vladic@openairinterface.org>
Date: Mon, 8 Apr 2024 15:26:00 +0200
Subject: [PATCH] Fix E2 Setup Request memory leakage

---
 .../E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c    | 27 ++++++++++---------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c b/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
index 1a3099bbaf4..dcc6ff13c36 100644
--- a/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
+++ b/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_kpm.c
@@ -420,26 +420,29 @@ bool read_kpm_sm(void* data)
 }
 
 static const char* kpm_meas_du[] = {
-  "DRB.RlcSduDelayDl", 
-  "DRB.UEThpDl", 
-  "DRB.UEThpUl", 
-  "RRU.PrbTotDl", 
+  "DRB.RlcSduDelayDl",
+  "DRB.UEThpDl",
+  "DRB.UEThpUl",
+  "RRU.PrbTotDl",
   "RRU.PrbTotUl",
+  NULL,
 };
 
 static const char* kpm_meas_gnb[] = {
-  "DRB.PdcpSduVolumeDL", 
-  "DRB.PdcpSduVolumeUL", 
-  "DRB.RlcSduDelayDl", 
-  "DRB.UEThpDl", 
-  "DRB.UEThpUl", 
-  "RRU.PrbTotDl", 
+  "DRB.PdcpSduVolumeDL",
+  "DRB.PdcpSduVolumeUL",
+  "DRB.RlcSduDelayDl",
+  "DRB.UEThpDl",
+  "DRB.UEThpUl",
+  "RRU.PrbTotDl",
   "RRU.PrbTotUl",
+  NULL,
 };
 
 static const char* kpm_meas_cuup[] = {
-  "DRB.PdcpSduVolumeDL", 
-  "DRB.PdcpSduVolumeUL", 
+  "DRB.PdcpSduVolumeDL",
+  "DRB.PdcpSduVolumeUL",
+  NULL,
 };
 
 typedef const char** meas_list;
-- 
GitLab