From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 57A992B9D for ; Mon, 18 Jul 2016 14:42:22 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 18 Jul 2016 05:42:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,383,1464678000"; d="scan'208";a="1023906767" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga002.fm.intel.com with ESMTP; 18 Jul 2016 05:42:20 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.125]) by IRSMSX153.ger.corp.intel.com ([169.254.9.105]) with mapi id 14.03.0248.002; Mon, 18 Jul 2016 13:42:20 +0100 From: "De Lara Guarch, Pablo" To: "Pattan, Reshma" CC: "Doherty, Declan" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] crypto: fix memory leak Thread-Index: AQHR4OvukWHKzAVNzkyMPXPZLgf0GaAeDiwAgAATgiA= Date: Mon, 18 Jul 2016 12:42:19 +0000 Message-ID: References: <1468843230-205038-1-git-send-email-pablo.de.lara.guarch@intel.com> <3AEA2BF9852C6F48A459DA490692831F0105A6D8@IRSMSX109.ger.corp.intel.com> In-Reply-To: <3AEA2BF9852C6F48A459DA490692831F0105A6D8@IRSMSX109.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWY0NTUxZmMtNzg4Yy00YTc0LTliYjYtNTQ5ZGFlMDA4MDVjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImxRMTh4WXhuWm10MjlxNWZKVGZBOVB0UDlYaFh4OU9lZ0pkR2NVaVhGYWs9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] crypto: fix memory leak 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, 18 Jul 2016 12:42:22 -0000 > -----Original Message----- > From: Pattan, Reshma > Sent: Monday, July 18, 2016 1:32 PM > To: De Lara Guarch, Pablo > Cc: Doherty, Declan; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] crypto: fix memory leak >=20 >=20 >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara > > Sent: Monday, July 18, 2016 1:01 PM > > To: dev@dpdk.org > > Cc: Doherty, Declan ; De Lara Guarch, Pablo > > > > Subject: [dpdk-dev] [PATCH] crypto: fix memory leak > > > > When parsing the parameters for virtual device initialization, rte_kvar= gs > > structure was being freed only if there was an error, not when parsing = was > > successful. > > > > Coverity issue: 124568 > > > > Fixes: f3e764fa2fb7 ("cryptodev: uninline parameter parsing") > > > > Signed-off-by: Pablo de Lara > > --- > > --- a/lib/librte_cryptodev/rte_cryptodev.c > > +++ b/lib/librte_cryptodev/rte_cryptodev.c > > @@ -148,7 +148,7 @@ int > > int ret; >=20 > You can initialize ret to 0 here instead of below. True. Thanks for this, will send a v2 shortly. >=20 > > > > if (params =3D=3D NULL) > > @@ -187,10 +187,11 @@ rte_cryptodev_parse_vdev_init_params(struct > > rte_crypto_vdev_init_params *params, > > } > > } > > > > - return 0; > > + ret =3D 0;