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 7F6F8201 for ; Wed, 31 Oct 2018 14:35:22 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Oct 2018 06:35:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,447,1534834800"; d="scan'208";a="245888205" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 31 Oct 2018 06:35:21 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 31 Oct 2018 06:35:20 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 31 Oct 2018 06:35:20 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.102]) with mapi id 14.03.0415.000; Wed, 31 Oct 2018 21:35:17 +0800 From: "Zhang, Qi Z" To: "Stojaczyk, Dariusz" , "dev@dpdk.org" CC: "Burakov, Anatoly" Thread-Topic: [PATCH] eal: fix memleak on device hotplug rollback Thread-Index: AQHUcRxsvt+6VcRgxUeE6Rq4x+5ZqqU5WU7Q Date: Wed, 31 Oct 2018 13:35:17 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532DDD06@SHSMSX103.ccr.corp.intel.com> References: <20181031131653.36722-1-dariusz.stojaczyk@intel.com> In-Reply-To: <20181031131653.36722-1-dariusz.stojaczyk@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjQ2NDBkODMtNzgzMi00NGY1LTgwYmMtNzYyY2VjNjgyYTE0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSjJTTTRKdVp4Y0dGa2cyek1GbGNPTEVMdkpURlpRd25vbnZzMGZmSXppVEcxN09KcVpmNTFRSWpTZjM3XC9zSWwifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] eal: fix memleak on device hotplug rollback X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 13:35:23 -0000 > -----Original Message----- > From: Stojaczyk, Dariusz > Sent: Wednesday, October 31, 2018 8:17 AM > To: dev@dpdk.org > Cc: Stojaczyk, Dariusz ; Zhang, Qi Z > ; Burakov, Anatoly > Subject: [PATCH] eal: fix memleak on device hotplug rollback >=20 > Fixes: 244d5130719c ("eal: enable hotplug on multi-process") > Cc: qi.z.zhang@intel.com > Cc: anatoly.burakov@intel.com >=20 > Signed-off-by: Darek Stojaczyk Acked-by: Qi Zhang Thanks Qi > --- > lib/librte_eal/common/hotplug_mp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/librte_eal/common/hotplug_mp.c > b/lib/librte_eal/common/hotplug_mp.c > index b68e4cabb..7c9fcc46c 100644 > --- a/lib/librte_eal/common/hotplug_mp.c > +++ b/lib/librte_eal/common/hotplug_mp.c > @@ -243,7 +243,7 @@ static void __handle_primary_request(void *param) > da =3D calloc(1, sizeof(*da)); > if (da =3D=3D NULL) { > ret =3D -ENOMEM; > - goto quit; > + break; > } >=20 > ret =3D rte_devargs_parse(da, req->devargs); @@ -266,6 +266,8 @@ > static void __handle_primary_request(void *param) >=20 > ret =3D local_dev_remove(dev); > quit: > + free(da->args); > + free(da); > break; > default: > ret =3D -EINVAL; > -- > 2.17.1