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 2DD8CA0C51 for ; Fri, 16 Jul 2021 14:04:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E30E41358; Fri, 16 Jul 2021 14:04:48 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F1B5B40151; Fri, 16 Jul 2021 14:04:44 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="197907843" X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="197907843" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jul 2021 05:04:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="429174937" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga007.fm.intel.com with ESMTP; 16 Jul 2021 05:04:39 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 16 Jul 2021 05:04:38 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 16 Jul 2021 05:04:38 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Fri, 16 Jul 2021 05:04:38 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.103) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 16 Jul 2021 05:04:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UP897MbYlc8Oe5/6jr9CMAuEIcv4aDlqm/x89WpJyEOeQkLo8igaEMa/LEz+Dbyfw8cwXmaiHZbI3/w2dabUClls6TI0tvxHSamoTIdLjWFSUlRqe/MdW1qOaBEhaE3F43z1lvATuW4daPXDnd5hDXut1A3wm4I+rMjCvAUfCwr7rrSOVlcOCN0NumuIMy8hqHMl3JlgXnwipVyb8Kf4OP+184ayOlgFWG7k7AJ3930v8ggQ1JIj+O3CPdERWk9zlu+cvVECmjrIDHfHKN2IylRI9xoOTf2CQ8wM3Ep/yk0p6rDxabbYFvviOf6kccUAjjcI2ZmQia2cJUQQPVU5ug== 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=xyM18fdgyGAmqKUCT1smROPR+EdSR7GrxJPT5GTukRU=; b=VRK7pdvzHlZvAWk7rm+yJuVXZUSUUYBe2/+E78V13H5NJCRW0M4aOXocpbz0fi2vJsElq6xT7XYnlaKttnyoSWdDaGdvWMnRmVEGGGlQKPqGktrIbGt57Fp/xsrAhlywNGhjAtoidl0JcKNu6VChQVGfb2dgyuT83eeDFA5CO7Lbo2zOxwy04T3g/+pjmcWdM2EFCH7Q/mH/YzBqVZLB5ijMv/vyiUB+Vi6pVlyWKvSeD3RYpyjggOSiWEbn0xa2hAbuTO1HODmVapRM5ywMo3/zVYPib4EXbtSzCW3P8xMNWZU7+243+R5UFjyOXaU7GVkL6efpA4ZmtziaVCgMug== 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=xyM18fdgyGAmqKUCT1smROPR+EdSR7GrxJPT5GTukRU=; b=FXBdnZiUeZ9uRDpLNnNQDu4fm6oMTGEo1um0TNAuVAIVYQnhVlgU87ObGSQUZYk1TomUyuWV/Hal9pBlgXtN1byHGGV7MOvrYxdJDJ/ZZkbAdaX45CCKZwzMBkmUHYuE90AgyMoBGWW/qfusnAgOTfgocte4cPr+TtVijH9icK4= Received: from BN9PR11MB5258.namprd11.prod.outlook.com (2603:10b6:408:133::13) by BN9PR11MB5257.namprd11.prod.outlook.com (2603:10b6:408:132::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Fri, 16 Jul 2021 12:04:36 +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.026; Fri, 16 Jul 2021 12:04:36 +0000 From: "Singh, Jasvinder" To: "Yu, DapengX" , "Dumitrescu, Cristian" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v4] net/softnic: fix memory leak in parsing arguments Thread-Index: AQHXeTuqpLux4SnC606TmvqsdvcMhatFgtKg Date: Fri, 16 Jul 2021 12:04:36 +0000 Message-ID: References: <20210714054702.764366-1-dapengx.yu@intel.com> <20210715053814.978200-1-dapengx.yu@intel.com> In-Reply-To: <20210715053814.978200-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: d9349edf-3a72-4469-6e45-08d94851e1d6 x-ms-traffictypediagnostic: BN9PR11MB5257: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6A5egURxOuKy+KksxqATjekgBb8hsKY/Xztwbd4jtcM8tI7bcFPcFY0+ns/boI5KAhVfTDL+RmeICGQ0rahEfi0aJTz1tkRHD9TymUu0Rpm+deHeWFeRzjr5vlhrG8d2XEdJArSP4mb11ozBfCeNZpdtWI8KmhW5PVAwec2mBM4Vq8f1dFXULiRJNxkfz3fedz32sHcLjrFE5uZFfAQocbdaH8KUpLtNzYVbHTN1wnVmk4HmhUtC0ZyuVFEgP9uEazf6Ae1Ez2jAoMtSeAi/6wHxMA4bNWIZBB9lv6Mia0XmlfHTnQAd1Pl3+KEShczScXMwGv5SctRbAZlk1rBhATHSXr+OHXNZ/xcya0+ys+IkNzqY51sQ6DiDpxANFsxFdh/zqYT6yX4BIwX8o6yhGZ5UPfaLkcBFSI1gx/awQT/T+CEPggx+/kDu5MP3eGgx91yFOFeetStSUpGNX9HEBFHPyqILQfWLwBd0uO9T6+X+w37caTp02yDWjabST99WmAkcYJVbZn21H+0BZqpQaREnA+XW3l6AtXtbWe9TQ8mIGyoLeaKW5mg3E9cFT700vDtbjSHcN0sLilpcUvxppWpeGIQUNc+eaEmnRaV+Qnu6xShazvZ7nm/jAx+k/i0+UViKldw+RrZqP9Khf3JU9lvkdOjZEEsBZk0ApdXrYkYTrmoCdV/prwllYJijQqOLYp7lKVl+TIQ5yl736JcWsw== 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)(136003)(346002)(396003)(39860400002)(376002)(366004)(5660300002)(52536014)(33656002)(55016002)(110136005)(316002)(9686003)(478600001)(2906002)(8936002)(4326008)(4744005)(8676002)(83380400001)(450100002)(54906003)(66476007)(186003)(66446008)(66946007)(76116006)(6506007)(53546011)(64756008)(66556008)(71200400001)(38100700002)(86362001)(122000001)(26005)(7696005)(6636002)(38070700004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YNyvUZpqCIQcW44FRkxt9IZ0YHUsOfIUIPHH75HtpJ6P6D9uEjB6oBynIfJB?= =?us-ascii?Q?WSpWYpSaZZo8xiSMHwj47SqVrWJgZNGCTBF8RdrBQMjnqz7i86dizuwjD+LJ?= =?us-ascii?Q?CBWyR25sXCeL+Qftod6H9vAEhLobyrFbvMubt7DWwqi7dZGZBb4wLkdFHw7C?= =?us-ascii?Q?GdYZLXIXUgiiYvTQJQQkYmCQefXSzOaNPI7D6NXuajFyyWZuG3oZzpDpqram?= =?us-ascii?Q?iMywixU6NoK0/nEaXFoqm5IQPNanbTdg+hKgS2e9pBp2sByfIWgrtcQyDH2M?= =?us-ascii?Q?IACQNkdeGSn3qR5bvL7aAL7vUsf/Lcdonmgfv6XRZZvxTxYyLq8V6jSpeRPW?= =?us-ascii?Q?lwqvEGD1gufAutzhrbP6RBPJ79zVsOzEaqwRNr9BpF5vUf7jwQNGU6Mag4Ga?= =?us-ascii?Q?HfZK4Ls29tyUjWMZX5egYNQKs3o7olBsxSN2A9tJysB/jjydldkvl/K6Fmie?= =?us-ascii?Q?uey90LmpOa5ToHklY1ONU81JXPaqgs4KMfBSUZrq7Bzr0FzpV4vweQMPzoP0?= =?us-ascii?Q?jlNa52Gido4NGM9f3ONSEdz/EkO2L03YYmjK0wEcloe8LQVkMX8+HsLliYvs?= =?us-ascii?Q?eMvroetH3EaPU9pw0dt/00FsU/N4t4Z6XkLUXjmVrKrpLHtPJFmB4kWD/f0c?= =?us-ascii?Q?az0aEa7wsQY3EfgwFOd1vWwchNwwRvS4aiGuQpU7OQE4+2iQ02GSHtJGwy6v?= =?us-ascii?Q?7AhFIIttXAKNs6p3wljXvR1KnTN/Y7AEXWhaVcB5fz07WcKaTIdaT4AHLenL?= =?us-ascii?Q?o6Lp3g0v83VjwIyLrmQ43dg9ISDybqP9dofwO7u9QVy4gEwvBeB8ad6/2aiT?= =?us-ascii?Q?8BPosIAapHidHhcLd8btRsKPZg//C0m7x0ozDp1ymfCyFmMMxFHWuqUQ6w1Z?= =?us-ascii?Q?LlVh06N8ddnA36hLiZcMiCQMpBE/Lo7qpmiHVV9+WIRxqB7OaR3xFh85QItQ?= =?us-ascii?Q?5wP+/LAZkSrwvsdcdf3G5TkG1gLSpQvjbwgYoJWLO+wSGriidWyQX67mxVd9?= =?us-ascii?Q?b/+Ocqt/0CtK4lrafi22iwYU8+3C3sz/QHcH+ZWI0cxH22nMFnKspiLiqkql?= =?us-ascii?Q?1nC2Rh63r0OzprjkqqbXPghtiqWQotZQ41b6Ac+bY6U4b+kN/Ms1lDhve6oM?= =?us-ascii?Q?0Q9RkECkeQw0i/9uefjiZ4g1lrthProkPWFpsU6xAcIpDXaMQ2jR5d420j9L?= =?us-ascii?Q?3vd1V2RBhRT+9l+mFpKE8se0N1xHknyD+6LMxAJpwCl8MOANRkexqj7aCUHE?= =?us-ascii?Q?4NPeDlW+OGIZmlwNfoHrzF3a3clfhXuXyLk8UCTqdIhw9IZiaUP9vFb7iliz?= =?us-ascii?Q?+iruNpPOa8jb6bkK2Ayzrnk4?= 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: d9349edf-3a72-4469-6e45-08d94851e1d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jul 2021 12:04:36.7774 (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: EP4nxt2v+v6k9KWchhdVk0GlSjFR7krLRgw+q+cpVvMStv7aPxRZtLWOyxKjof3FcJHDhSpnPmvRtM/cySWllSZEnPOeGaIKkx82uBwdTZE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5257 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH v4] 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" > -----Original Message----- > From: Yu, DapengX > Sent: Thursday, July 15, 2021 6:38 AM > To: Singh, Jasvinder ; Dumitrescu, Cristian > > Cc: dev@dpdk.org; Yu, DapengX ; stable@dpdk.org > Subject: [PATCH v4] net/softnic: fix memory leak in parsing arguments >=20 > From: Dapeng Yu >=20 > In function pmd_parse_args(), firmware path is duplicated from device > arguments as character string, but is never freed, which cause memory lea= k. >=20 > This patch changes the type of firmware member of struct pmd_params to > character array, to make memory resource release unnecessary, and > changes the type of name member to character array, to keep the > consistency of character string handling in struct pmd_params. >=20 > Fixes: 7e68bc20f8c8 ("net/softnic: restructure") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dapeng Yu > --- Acked-by: Jasvinder Singh