From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C00D4ADD0 for ; Mon, 23 Feb 2015 14:27:46 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 23 Feb 2015 05:27:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,631,1418112000"; d="scan'208";a="681985512" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga002.fm.intel.com with ESMTP; 23 Feb 2015 05:27:45 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.69]) by IRSMSX106.ger.corp.intel.com ([169.254.8.235]) with mapi id 14.03.0195.001; Mon, 23 Feb 2015 13:27:43 +0000 From: "Wodkowski, PawelX" To: "Mcnamara, John" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init Thread-Index: AQHQT2sfXc4k42eRqESLJsusHzkVbpz+OWCQ Date: Mon, 23 Feb 2015 13:27:42 +0000 Message-ID: References: <1424697435-13667-1-git-send-email-john.mcnamara@intel.com> In-Reply-To: <1424697435-13667-1-git-send-email-john.mcnamara@intel.com> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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:27:47 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of John McNamara > Sent: Monday, February 23, 2015 2:17 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev = init >=20 > Fix for Klockwork identified issue. >=20 > Signed-off-by: John McNamara > --- > lib/librte_pmd_ring/rte_eth_ring.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) >=20 > 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 =3D NULL; > int ret =3D 0; > struct node_action_list *info =3D NULL; >=20 > @@ -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; > } >=20 > -- > 1.7.4.1 This is wrong/incomplete as rte_kvargs_free() is unable to handle NULL argu= ment. I have patch under review that fix this issue along with rte_kvargs_free(). Pawel