From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA10C43193 for ; Wed, 18 Oct 2023 04:05:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C155D40151; Wed, 18 Oct 2023 04:05:48 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 251384003C for ; Wed, 18 Oct 2023 04:05:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697594747; x=1729130747; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=qx4hAXGtUAfyV93YVS7OWQHfVdMnhj21niw6WAT6nHY=; b=C/IktPMIZ6UH8ByQJCcSnBP9o8Tf4u9266j7GrsgQx1+RilGB9tFXR4C 7nfeEvQWH8gW+bznafMiaoy6k2haJlvqZ1wsMiq+mzjWPGHdutqZrtFfk c+1bCkWuTRvA4oT+i0GqUrQJ3d8Cx1n+7xAmOkWgayY5/aWL+xZQ9uZi4 JwRLwbSaf6fGKhQlCQHB2xXcm7UvzirWAKlYmPirf6iLiXlh7dyWohAjw F0fAejV7avvv39hv+dfbkryXx4w3cbHpAPgrgpsPOJWfWGJrMaQKvIKkV 2G1oca95UFlCB4jQFL4mRmctaJteG6YuqPe7ei0joRjBUS9Z3PaqsyoxF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="365270797" X-IronPort-AV: E=Sophos;i="6.03,233,1694761200"; d="scan'208";a="365270797" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 19:05:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10866"; a="929980380" X-IronPort-AV: E=Sophos;i="6.03,233,1694761200"; d="scan'208";a="929980380" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 Oct 2023 19:05:45 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 17 Oct 2023 19:05:45 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 17 Oct 2023 19:05:45 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 17 Oct 2023 19:05:45 -0700 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by SN7PR11MB6849.namprd11.prod.outlook.com (2603:10b6:806:2a1::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Wed, 18 Oct 2023 02:05:41 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::27ea:67e:2966:23e3%3]) with mapi id 15.20.6907.021; Wed, 18 Oct 2023 02:05:35 +0000 From: "Zhang, Qi Z" To: "Xing, Beilei" , "Wu, Jingjing" CC: "dev@dpdk.org" , "Xing, Beilei" , "stable@dpdk.org" Subject: RE: [PATCH] net/cpfl: fix memory leak Thread-Topic: [PATCH] net/cpfl: fix memory leak Thread-Index: AQHaAKRFnndCnqkN6k63/f472MCfebBOzSJg Date: Wed, 18 Oct 2023 02:05:34 +0000 Message-ID: References: <20231017110655.582873-1-beilei.xing@intel.com> In-Reply-To: <20231017110655.582873-1-beilei.xing@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|SN7PR11MB6849:EE_ x-ms-office365-filtering-correlation-id: 5145aebd-4067-41d0-5047-08dbcf7eb734 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xjN+Xg/g7nMfftgaT2GknbFr8AmGSF9nHkojK9BouuE1tBxqMzQaMq9baCb4EMVB8IJeiqz4x9DTUnZddqHcoJPzaBNYTfK/39KY+TQVz7+I5cUK9xuJFAuGjrh0aU2HSDUD8Ddyu8UEVrlzPdl4Td/owdNxIK+WbEkp3xSo98pArcaq5fBdIkqzWFmhd3JzKtRzHzuefByFfYTccLdXLrhaQK6+GrZpPAnIh1Cxze6TAPcSjYLlDBs2qtGG1H9YQHvcKNOySbooKVpYonHGYGvDQyRFofq2AkiNgE/w8ZgATp74LsxJLMAOFXxTyUcSmBPcO8jsMluAzDKJdawa4cxI3MVLqoEyhOdhPW+wgW2VZKY/KyPZKRnoH7CYmCSnCvW9iCAX10g/g4pwX4SxsUQBInk3heEGB88pk1Rjy2/BGVZh6kwOvFg6oXfw6j/uw60XCYLAe2K/mRhbwdkrNao1JUgziaXiwCuIg/nCoE5SlXgtmu2iYIB2aaDxOM6hg10ynbB5PEWxfbtydN/D6U9y50IMrwpl8o9GupFvOfZEt8I6UCSh8NGB8D7jh+lZe4oIz56bbmLLZ27GvgkQnhR+v2QCMzxzJ2z1rM/kyirDBSGXiaEA5c28SgOSQYck x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(376002)(366004)(346002)(39860400002)(396003)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(6506007)(55016003)(66556008)(66946007)(66446008)(478600001)(6636002)(54906003)(110136005)(76116006)(64756008)(66476007)(83380400001)(38100700002)(71200400001)(9686003)(26005)(7696005)(316002)(53546011)(122000001)(41300700001)(82960400001)(33656002)(38070700005)(86362001)(450100002)(52536014)(8676002)(4326008)(5660300002)(8936002)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XOiEz0Spcl1fTb3pQPWXuwYqD6nn/r7E0iMsv36Py/gyJVy1jz2QVwIMQnFh?= =?us-ascii?Q?vOq5hSg56Jj3WKqq2gbGPz0rotQTUSBiCBObyGnEjH2akP3ITN0zeY/K0XNr?= =?us-ascii?Q?IRsRtjCOr+hcP5xYIyxUrwwDFzbCuV+zRXhJi/dpAJ2n+AjUMpblPtLG5IeU?= =?us-ascii?Q?Zn94kKPB5CKqSj6ij6nvjfxE7j5Yho84DnafB/lH7o2Y6RbiJArnT5NcCQyQ?= =?us-ascii?Q?PQOk8AdAs7eex+s1f9Upi9HOyzTKq5kOCe63t7ThxJCd0THvyxsK6Abbt9+P?= =?us-ascii?Q?N79Ehjfjd1lciljXeWRYsJKw9d9Mo1JfF7qs3vOrKA9gA+MXjmljwXuUUMUk?= =?us-ascii?Q?2sOOentd6g7hXxOGkpTiCYj4TKv74eFGvTcde8BqKBGVTQnE8ktxoq21xXZ8?= =?us-ascii?Q?u1WkJnOhJErtbihsZm3lxgfGuGlIUPZhnlv2Rh9bLLTzwfHSNbTBZRoLaUIH?= =?us-ascii?Q?dDlLfYj5jdH9hpkPTcsLrpqf8tWn9JZYCuXF68f3VD6gc4Qg58kcA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KvPoD5OS6uHU3fC08SZmmQf7RAAJ6t?= =?us-ascii?Q?gE9WG0PqfUXn1KoLX68s4rvEqgfFhGFgT6/Dr2a+whXQgmYDxiHUAohfvACP?= =?us-ascii?Q?vvDj3yABTXyjgFKGEFmu7qFK8z+NehjedaCUxrxrJFPKEviBpqujLUyAzqfl?= =?us-ascii?Q?pzshxXPQzYYjG+22qr4OpDx2z5kwqsALRjjk1Epx?= arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RdcjOPNd68sRztRreGjYJQYv73XVR6nI/sozktGXepZ/mNbsBJ1s1VO6w+ksgrZITcRybR6/DamEOt/+AIT+LBm0y7SuEGh/kPoKqC12IQ/SE0khsVbiY5iw3CT8heFdFrYVXYpaEvjVvIYNGQj0fUifPDo9K0ahhfTgLGCTkjBna8+8jU6E2cDwxwK9Euqf80KnnjfMtXiu12N57ivH3DmDwwqkRYgcJ5RHJxexe513ds64tsAFWgsMBHJY5PSKwuYpSN76aoJQPd2UP5YK3rUcOgtZ8tmqmNyDt6n1FQinMkMf5mREYprCqY2JCrhmdCuMiGi9grlJSvJ0hWKwJw== arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UMEIdcW8X6MOUFuI/vf4GB/YWX8u+M0aGKF97Gzeq4Q=; b=d4RtkiJy5eJxncpxAfb7tYVcvaGs4gE1ESkuIXO2GdGDNG/y8rZmtlf0PCPnpikjiH/+xNJokT39j65/BcQISvITB9RbBFV6PNedTecRI5LEbpQgYYqegpOa6KOrDyU56zFhDpHMOp9VSU6YHEV17Z5+U4/mqHAHd42uE2iZbMvebv2giN8WVR3eJXjAMyIW5+BhPNYSjiU6aE+RNXQh5VliFjsBBHyxfzhJVQ+rKLcCLWxlABtcijlV0sZ5mCYE9xk/yvec0Nx11jVLbn/cxb3CEic+aL25wNY2huZrGtZx/AlLBn98JVaJvxtzntztZAmZ8OHKhr33gRghJHuTIA== arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: DM4PR11MB5994.namprd11.prod.outlook.com x-ms-exchange-crosstenant-network-message-id: 5145aebd-4067-41d0-5047-08dbcf7eb734 x-ms-exchange-crosstenant-originalarrivaltime: 18 Oct 2023 02:05:34.9467 (UTC) x-ms-exchange-crosstenant-fromentityheader: Hosted x-ms-exchange-crosstenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d x-ms-exchange-crosstenant-mailboxtype: HOSTED x-ms-exchange-crosstenant-userprincipalname: vDVwulVDHivLC+hGFu24f/fDV666wgjaWsVJJEkVZxidTbVxU1QL7OsmEJln/DqvJI6m6D2FDqdt5QswtezTPg== x-ms-exchange-transport-crosstenantheadersstamped: SN7PR11MB6849 x-originatororg: intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: beilei.xing@intel.com > Sent: Tuesday, October 17, 2023 7:07 PM > To: Wu, Jingjing > Cc: dev@dpdk.org; Xing, Beilei ; stable@dpdk.org > Subject: [PATCH] net/cpfl: fix memory leak > > From: Beilei Xing > > Fix resource leak reported in coverity scan. > > Coverity issue: 403265 > Fixes: 2d823ecd671c ("net/cpfl: support device initialization") > Fixes: 989465ac51ea ("net/cpfl: support probe again") > Cc: stable@dpdk.org > > Signed-off-by: Beilei Xing > --- > drivers/net/cpfl/cpfl_ethdev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethde= v.c > index 890a027a1d..0093deab5a 100644 > --- a/drivers/net/cpfl/cpfl_ethdev.c > +++ b/drivers/net/cpfl/cpfl_ethdev.c > @@ -1626,7 +1626,8 @@ cpfl_parse_devargs(struct rte_pci_device *pci_dev, > struct cpfl_adapter_ext *adap > > if (rte_kvargs_count(kvlist, CPFL_VPORT) > 1) { > PMD_INIT_LOG(ERR, "devarg vport is duplicated."); > - return -EINVAL; > + ret =3D -EINVAL; > + goto fail; > } > > ret =3D rte_kvargs_process(kvlist, CPFL_REPRESENTOR, &parse_repr, > cpfl_args); @@ -1635,7 +1636,7 @@ cpfl_parse_devargs(struct > rte_pci_device *pci_dev, struct cpfl_adapter_ext *adap > goto fail; > > if (!first) > - return 0; > + goto fail; goto fail in a success case cause confusion, maybe we can rename "fail" as = "finish", or adding a another label right before "fail"? > > ret =3D rte_kvargs_process(kvlist, CPFL_VPORT, &parse_vport, > cpfl_args); > -- > 2.34.1