From 9176f90a3d9c7a0e6e6dcea0b19b469e5d61b594 Mon Sep 17 00:00:00 2001
From: Dong Anyuan <donganyuan@cn.fujitsu.com>
Date: Tue, 28 May 2019 21:19:17 +0900
Subject: [PATCH] Fix Coverity Scan CID 300476 (Variable dl_mac_config_msg
 going out of scope leaks the storage it points to.)

---
 openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
index d19399e256..1ae1127ec3 100644
--- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
@@ -1088,6 +1088,7 @@ int flexran_agent_mac_create_empty_dl_config(mid_t mod_id, Protocol__FlexranMess
 
   *msg = malloc(sizeof(Protocol__FlexranMessage));
   if(*msg == NULL) {
+    free(dl_mac_config_msg);
     free(header);
     goto error;
   }
-- 
GitLab