From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 59CF8968 for ; Mon, 18 Jul 2016 14:32:08 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 18 Jul 2016 05:32:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,383,1464678000"; d="scan'208";a="1008946332" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by fmsmga001.fm.intel.com with ESMTP; 18 Jul 2016 05:32:06 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.193]) by IRSMSX101.ger.corp.intel.com ([169.254.1.155]) with mapi id 14.03.0248.002; Mon, 18 Jul 2016 13:32:05 +0100 From: "Pattan, Reshma" To: "De Lara Guarch, Pablo" CC: "Doherty, Declan" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] crypto: fix memory leak Thread-Index: AQHR4OxBo7j110W9y0G7MprqMxVVzKAeHjFg Date: Mon, 18 Jul 2016 12:32:04 +0000 Message-ID: <3AEA2BF9852C6F48A459DA490692831F0105A6D8@IRSMSX109.ger.corp.intel.com> References: <1468843230-205038-1-git-send-email-pablo.de.lara.guarch@intel.com> In-Reply-To: <1468843230-205038-1-git-send-email-pablo.de.lara.guarch@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.181] 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:32:08 -0000 > -----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 >=20 > When parsing the parameters for virtual device initialization, rte_kvargs > structure was being freed only if there was an error, not when parsing wa= s > successful. >=20 > Coverity issue: 124568 >=20 > Fixes: f3e764fa2fb7 ("cryptodev: uninline parameter parsing") >=20 > 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; You can initialize ret to 0 here instead of below. >=20 > if (params =3D=3D NULL) > @@ -187,10 +187,11 @@ rte_cryptodev_parse_vdev_init_params(struct > rte_crypto_vdev_init_params *params, > } > } >=20 > - return 0; > + ret =3D 0;