From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 42CD6AE01 for ; Mon, 23 Feb 2015 14:17:21 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 23 Feb 2015 05:13:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,631,1418112000"; d="scan'208";a="689411865" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 23 Feb 2015 05:17:18 -0800 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t1NDHGNG014504; Mon, 23 Feb 2015 13:17:16 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t1NDHGvg013710; Mon, 23 Feb 2015 13:17:16 GMT Received: (from jmcnam2x@localhost) by sivswdev02.ir.intel.com with id t1NDHGGW013706; Mon, 23 Feb 2015 13:17:16 GMT From: John McNamara To: dev@dpdk.org Date: Mon, 23 Feb 2015 13:17:15 +0000 Message-Id: <1424697435-13667-1-git-send-email-john.mcnamara@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2015 13:17:21 -0000 Fix for Klockwork identified issue. Signed-off-by: John McNamara --- lib/librte_pmd_ring/rte_eth_ring.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index a23e933..88a1382 100644 --- a/lib/librte_pmd_ring/rte_eth_ring.c +++ b/lib/librte_pmd_ring/rte_eth_ring.c @@ -527,7 +527,7 @@ out: static int rte_pmd_ring_devinit(const char *name, const char *params) { - struct rte_kvargs *kvlist; + struct rte_kvargs *kvlist = NULL; int ret = 0; struct node_action_list *info = NULL; @@ -569,6 +569,7 @@ rte_pmd_ring_devinit(const char *name, const char *params) out_free: rte_free(info); out: + rte_kvargs_free(kvlist); return ret; } -- 1.7.4.1