From mboxrd@z Thu Jan 1 00:00:00 1970 From: Remy Horton Subject: [PATCH v2 2/2] examples/l2fwd-keepalive: fix Coverity issues Date: Mon, 20 Jun 2016 16:23:07 +0100 Message-ID: <1466436187-5225-3-git-send-email-remy.horton@intel.com> References: <1466436187-5225-1-git-send-email-remy.horton@intel.com> To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 200CA95DB for ; Mon, 20 Jun 2016 17:23:10 +0200 (CEST) In-Reply-To: <1466436187-5225-1-git-send-email-remy.horton@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes memory leaks detected by Coverity. These are due to ephemeral memory allocations not being freed when errors occur. Coverity issue 127349: Resource leak Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch") Signed-off-by: Remy Horton --- examples/l2fwd-keepalive/shm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/l2fwd-keepalive/shm.c b/examples/l2fwd-keepalive/shm.c index 66fc433..177aa5b 100644 --- a/examples/l2fwd-keepalive/shm.c +++ b/examples/l2fwd-keepalive/shm.c @@ -80,6 +80,8 @@ struct rte_keepalive_shm *rte_keepalive_shm_create(void) RTE_LOG(INFO, EAL, "Failed to setup SHM semaphore (%s)\n", strerror(errno)); + munmap(ka_shm, + sizeof(struct rte_keepalive_shm)); return NULL; } -- 2.5.5