From 4eb0344714056a04cadb268ed6808bf0f181ad71 Mon Sep 17 00:00:00 2001 From: Dong Anyuan Date: Thu, 20 Jun 2019 12:37:36 +0900 Subject: [PATCH] Fix Coverity Scan CID 60348 (Variable addr going out of scope leaks the storage it points to.) --- openair3/SCTP/sctp_eNB_task.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index d8ffbe6dc9..e934888178 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -832,6 +832,11 @@ err: sctp_cnx = NULL; } + if (addr != NULL) { + free(addr); + addr = NULL; + } + return -1; }