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 E2E87A0C4C for ; Wed, 14 Jul 2021 13:07:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0D5D4130F; Wed, 14 Jul 2021 13:07:39 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id D9E134069F; Wed, 14 Jul 2021 13:07:36 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10044"; a="210369823" X-IronPort-AV: E=Sophos;i="5.84,239,1620716400"; d="scan'208";a="210369823" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2021 04:07:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="459952743" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga008.jf.intel.com with ESMTP; 14 Jul 2021 04:07:32 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Wed, 14 Jul 2021 04:07:32 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Wed, 14 Jul 2021 04:07:32 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.45) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Wed, 14 Jul 2021 04:07:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AkY0FmbViIjjgYxWtx0TuLxb8eq/rG1CfOMgdzyDHSEbPoG0R4TXE3eA0pI2QhI460hoR5mH8muUftIdGsxNXVuvJe8SyL1K3Untd8t2xkDzXBNfnAvURCAJLDPp2JXW1EShLA2G0gOmKszf7d5cItI3ENsvFk+WfRYHlmZkhtDpXMSChent0VTz7Wslt0XQbOybh/nBjX//Da3lnf3TLk4rV2+UyM3LKhGxqm8BxdiIkKvKlRDBF35tLLDWUMeiBiGojlp+ueMZD3xx3VSV3vf86oIv1VECMgeoGoDswrEjoerg87qQtyZW1knZHr3R/SUKOqhfUfPaN+O2gKh5WQ== 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-SenderADCheck; bh=W0VtJWTD5ebR0llk23PJwNAUiDR/W0bnGGQLZz1ianM=; b=odmKOXLP1HDKTkMvISAVJNS/bipxD/iW6pKZL3TD2nuTx9Ys73ruUwhpM21Rh/EOu6GLFN4IR6BWKfnvzwGmq0xyHEbA7lTi7gS79DvDZE/UPttuHMNcU1Fy+d1Eec8W065onQqKy4ZmS/wfZT/ySo2BT3JEDwXJoNkK+5duaWj7zkvYelVfceT7NnXI6q9e16WwawMuywNqzWZKrdNlDz6cHpwFPE9+hFoXX5gdHAviAIMmUud/lZdY+w4ubckCyMrwVyTRWef37pU4zx3sSMeC1t5j3sx8zQ8VmJPqCcqxPK1o3UnfoArxqTB32J4HAm9CwGg1iCvDcil5/E/HGw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W0VtJWTD5ebR0llk23PJwNAUiDR/W0bnGGQLZz1ianM=; b=h0/i6i9Mo5Xa57Fo0an77v0FljbcQndQ66B2AMbzWMOPXZ/CRQWtWj4DVAiw8G/3Q4wA9yGVh+PVDLrcVFwOCsANr6Md/Q2uKQAJlByQ0N645HIPh4cvC/UN1TQVvYwjNcanh7c3oPSrS6t6x7tdkZM0fS0HYRvWgSr//s6Rpn8= Received: from BN9PR11MB5258.namprd11.prod.outlook.com (2603:10b6:408:133::13) by BN8PR11MB3746.namprd11.prod.outlook.com (2603:10b6:408:8c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Wed, 14 Jul 2021 11:07:30 +0000 Received: from BN9PR11MB5258.namprd11.prod.outlook.com ([fe80::c73:8099:7af4:1f09]) by BN9PR11MB5258.namprd11.prod.outlook.com ([fe80::c73:8099:7af4:1f09%8]) with mapi id 15.20.4331.022; Wed, 14 Jul 2021 11:07:30 +0000 From: "Singh, Jasvinder" To: "Yu, DapengX" , "Dumitrescu, Cristian" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v3] net/softnic: fix memory leak in parsing arguments Thread-Index: AQHXeHPLcbf50vWsG0C5c3+h9TFWTKtCTP0Q Date: Wed, 14 Jul 2021 11:07:30 +0000 Message-ID: References: <20210713100801.597956-1-dapengx.yu@intel.com> <20210714054702.764366-1-dapengx.yu@intel.com> In-Reply-To: <20210714054702.764366-1-dapengx.yu@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3c19b1dd-ae46-4f19-d98b-08d946b7928b x-ms-traffictypediagnostic: BN8PR11MB3746: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aHKucQuK+nnUVU0/xhGLLG9Gbg4XN+XN8lwritvCl9Slm+ya4TZdli3vIaxFEhK00mAFq/HPRyEnuPZFvZUwMblyesmdiE52ZYbnZU1PJ3fu2i/0PKDCPi1N8qNo0GPjHdvmBvKiqeQ9BGKBngbSlk8M6T+laQpqJGweFxC5DssIHzNgL7cVqUPcSlE8CG6TTVhmy8G77GNAqgNUyIWrv4zwFP5xbPSsmdQAF0W2zfv9n0VQ1YzDTlAvdfdxjxYak1QSFs0/CGqjkbnXt67ouFDAEmuB8GaWhsLxEaFG0CztUs8ZGZuOZLXsNozRznkpTe2Op9OPdfrgDbHznAkuAP6nRukK4OpY7xJ1BzlKUsJUgrXfmee513dfiwXyF9vRd4fIH3TIodFEDrdSHqgF1cpvqJrnzg06WuxBDowLol6B69sCEYSfpXVEcQjReEY8klHUigO1HkFlcZjOq+/mM+Or9kBdrIdpMo/wmj/CwTnVAxFlmYzqiBtytA9KB8HB6lcwnmcHXW20DQVFBlkFFJPGrr33BYmkAAlXph6KL/b2qM9E1IIdr0FP59Ps05w+7pS5nsRt/26mbw7RqdAiaAwZ/lO7QUg6uL/pfzZiv7mhrzpPOSEHlUqgx+llUCkN8KsXwj7OfvL2azUoQA4ke8sRD7n0grsk8aLsZQ+Kb4zZj8Hu0cIc9XmQeWRixeDf78PhV7Eddnj2WBhkumMG1w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR11MB5258.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(376002)(136003)(39860400002)(396003)(52536014)(33656002)(64756008)(186003)(5660300002)(8676002)(26005)(7696005)(55016002)(76116006)(2906002)(4744005)(86362001)(316002)(66556008)(110136005)(8936002)(71200400001)(9686003)(66476007)(38100700002)(54906003)(4326008)(6506007)(478600001)(450100002)(6636002)(66946007)(122000001)(66446008)(38070700004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fnZ4Ug4fRDFIwAzwrqpN7iY+nJy7VRT+rDb1fah8/h8Xqa8GkytuXjn7wO43?= =?us-ascii?Q?MYVg3BUX+2S6FuNI+svNCAv+hD0CmCEX7idRuSvlfxY4iMk7qecsyt63cGVq?= =?us-ascii?Q?zx1RkFmcYfQiVDKaiZD8ermjl+1q9s2dUWKY4suaBtdI0G/GqnjylwBqIpVD?= =?us-ascii?Q?B7cvVNfnMA8iRC4Aa0ZcES8fD6AaFAbMT6jNJNt91BEFoXQGRbr98hQrNMJW?= =?us-ascii?Q?8Mb25DzCG389I2MtagT6EVI0EDSdVnJ7rIP6Bw/cahg8oMdXL5RZlq8e6sLA?= =?us-ascii?Q?MMkaR7P3K6WT2K7lIn6s8BulZ6rEQzRpMRqrRctZ4YjT/mL8ojsatW71ZstU?= =?us-ascii?Q?cAchNvCGr0TLHBaqGoasuVXXyqLj06+EEdU8B7mbm6s4hZaD6gq2PEltS4lg?= =?us-ascii?Q?hOD7vBeoPtG+w1thFnyZS8aHI7RK6CWNEXoD0pd17NEOyRdbQnSOP6opfDXH?= =?us-ascii?Q?m+Puy1MQ9KPoBMVXZ/JODGOtyhMfKkCZJvMhJz9XzdTh9gc/yj7MUe/o5TZD?= =?us-ascii?Q?M7rc7pk4GoGLbhV7jeFswzqEicg071CU7A4g5do8LOIKrcOS51j03ixqoXGB?= =?us-ascii?Q?WbXJPQreNuyvyjqGGjEF5id0dh3CniSZ+R9hjlBvbZ6ldb6HEb2/fkfdoyP2?= =?us-ascii?Q?3k67UJlANE+m8IagUVaLnBAuvcd0KGwGm7NJWKoP+pCgrjYmLLk/LKUWeH0B?= =?us-ascii?Q?eP2CXFB9elXHopKYwV2J4B7oEfxPIg90CNUTKtd3kMuPdukFa+4Sg91/9Hcu?= =?us-ascii?Q?luNxGPIl8YVRDoIk/RyFexdTWlO9a7HOaxZGtIut38Lb62j6yBeGJqzPFYWt?= =?us-ascii?Q?p3yj7Idl6KiW9dutkSLoALmrXe1S5Yho2+HpP20stvNNKcawmQrdMnqf/1+T?= =?us-ascii?Q?KCDCp2Hq/5Tpd2pO/03SXGCLZWgSaTHLVe3BNrM1peGY0DRXXQSh4GDyX5A6?= =?us-ascii?Q?YdwZJj1ePwZBNqY1PA8q2dO7wYPBX9iJxNyRKeM9pk7/3/2Fbxxayn5fMCSJ?= =?us-ascii?Q?w+cQo1VnrzYAjMSKkDCvQXIrehf4/BfA8iA9kwXC4kAx911FYbSFgF78NslQ?= =?us-ascii?Q?kjBXmqqSJU9V+Z9H1ysJfWz1ahbX2KobMejWXWnFqWLdGuh0k0VAD0BP7DEu?= =?us-ascii?Q?RQPZ5QlsfmEwgOzK8QnBGYhlYiT+0NfPuMvi0CwRUbRMTGjJFN5OOHGI5ge6?= =?us-ascii?Q?cFxnjclsKnvqD+D5bmyDtpjeN0YbrsrUuKSlL2rn+GSHM9h7R50zd1Jfhqnh?= =?us-ascii?Q?Ty6mPK7m2r6HpJYT7XSFIgOGraYut+VkrCqj1AWvnCX/6DO7MlFUrPFlJUbK?= =?us-ascii?Q?VuREhbBp084YcZ+4BYFI9DG6?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5258.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c19b1dd-ae46-4f19-d98b-08d946b7928b X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jul 2021 11:07:30.0278 (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: r5i7GDDIsM6bNfj04AX0PbXjT//YZeXQoFOWXkfPXK8opml/h9HkAkEttpVsE+k2cTpSJs4abWTez2ex89sbLWDyjQ/9SHUWQSE+Yek5+2Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3746 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH v3] net/softnic: fix memory leak in parsing arguments 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 Sender: "stable" > + free(firmware); Memory for firmware is not allocated dynamically, so no need for this. > struct pmd_params { > - const char *name; > - const char *firmware; > + char name[RTE_DEV_NAME_MAX_LEN]; Please replace " RTE_DEV_NAME_MAX_LEN " with "NAME_SIZE" which is already d= efined in softnic_internals.h > + char firmware[PATH_MAX]; Also, instead of using PATH_MAX, define new macro "SOFTNIC_PATH_MAX 4096"= in softnic_internals.h > uint16_t conn_port; > uint32_t cpu_id; > int sc; /**< Service cores. */ > -- > 2.27.0