From 8fe94b2f2ce37717158d0b0dea96649e5ceec3b0 Mon Sep 17 00:00:00 2001
From: Dong Anyuan <donganyuan@cn.fujitsu.com>
Date: Thu, 20 Jun 2019 12:00:51 +0900
Subject: [PATCH] Fix Coverity Scan CID 261458 (Variable message_p going out of
 scope leaks the storage it points to.)

---
 openair3/S1AP/s1ap_eNB_handlers.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c
index d5436df9fc..22501bf9a5 100644
--- a/openair3/S1AP/s1ap_eNB_handlers.c
+++ b/openair3/S1AP/s1ap_eNB_handlers.c
@@ -1212,6 +1212,7 @@ int s1ap_eNB_handle_paging(uint32_t               assoc_id,
     } else {
       /* invalid paging_p->cnDomain */
       S1AP_ERROR("[SCTP %d] Received Paging : cnDomain(%ld) is unknown\n", assoc_id, ie->value.choice.CNDomain);
+      itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
       return -1;
     }
   } else {
-- 
GitLab