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 1F568A00C5; Wed, 2 Feb 2022 15:54:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE1B040688; Wed, 2 Feb 2022 15:54:50 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 705DE40141 for ; Wed, 2 Feb 2022 15:54:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643813688; x=1675349688; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=qrG52K+suPQ7cZsfDDoibfnPmvYgF8w4Lni7dXKydH8=; b=WeT3ylVypQnmHExoLpwVGE4AWOeAE0VF8yPgQWtpUexB3bUCHFik1fZq 440EJDdurYEHJF4t4YIrKl88hs6KtJMwuVTBxM9MLzRblQQ+/aCeYSHPk /Cn9k2/Guhb41LdTmzaelgyZx1b00cGaJ0VNZwFGRbxiCzNokjQgMQU5Z CrerD0yz5AdNCspMWN1zmDmKch2WwxSMt4h7v3KYepL8NOZI6GOG/zx2z ItPaWqrZy8Ogq4As6sHoc3oA8W0y6+d9dognR/3yOwDMjeGcJhMLKinOP bKtLRHgdjqTHsUc4khI1/129dKt70rynERLGTY1EWO4Lpqneue59aiAjN g==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="272414865" X-IronPort-AV: E=Sophos;i="5.88,337,1635231600"; d="scan'208";a="272414865" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2022 06:54:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,337,1635231600"; d="scan'208";a="566010118" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga001.jf.intel.com with ESMTP; 02 Feb 2022 06:54:21 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) 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.2308.20; Wed, 2 Feb 2022 06:54:20 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 2 Feb 2022 06:54:20 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 2 Feb 2022 06:54:19 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZ8D06DOm+bpdRNRVEBrIcZh85NL7ggb1vUJBmn0QP4Gxs2x4pvWfNKwzQN3yl0t7NOXU+EqUC7rBmtyixwDePWH8zBzyYIsDSjmgzlnQRNDRkAMTKTrADG/lqmPV+hSvGjyyZj5Kb7t4Ec0By9RtahfNzZ0I1De/3JycGvR0iuvJB2XeYR/njbGoSmewTu4r2f1DBlR09e7M2jgEB4+sOTOeim+9Yx7ONO3VSMpdRA5QntNwqr3Oa2wAxCnUm5netf+SP100zQ1B/HcwXrtrcczIMI60+3h8PbYs8JPOdg6CzfxUZpUJGWu8fXaRQhPJOfw3NiRfT5xlNFy2U4htQ== 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=Kdbt8h4K/VVWNtWZCsmiHJNhFpPk25JHil4B08El2xU=; b=JzxdZx7vHu50VeEaD7xYsYwWoP1MJhJkGMdPLvEaNR3yaSZHc4KmePv+Byk5rVkmJw7vF11lPpOtpNnWGXp4koCYL22HLMRSJz5edtr/bdiZi9HYALZw6MvzCx+mNcgszkfKXKg/W5554hQymY72FNs/OB0cGt7rPd79eAE+9FHHOjxx2d0ENVCI9e+iyET7lcqEKPBOxtGLmtJ+OpNlgcBcTOkaHdzzyHye3U/v0WoN82gj3eprRS0FfDcDr+YNoFjE3tdSlc/VGwstoPz+f4QCot2j5//EMkCcpTb9WE9PgxR1ACXcaAvCUbErugwWHTOvU2kC7BayT3ftzb2+vg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MW4PR11MB5911.namprd11.prod.outlook.com (2603:10b6:303:16b::16) by MW3PR11MB4619.namprd11.prod.outlook.com (2603:10b6:303:5b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.17; Wed, 2 Feb 2022 14:54:17 +0000 Received: from MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::e00c:1274:42e2:8355]) by MW4PR11MB5911.namprd11.prod.outlook.com ([fe80::e00c:1274:42e2:8355%7]) with mapi id 15.20.4930.021; Wed, 2 Feb 2022 14:54:17 +0000 From: "Kundapura, Ganapati" To: "Kundapura, Ganapati" , Weiguo Li , "Jayatheerthan, Jay" CC: "Naga Harish K, S V" , "dev@dpdk.org" Subject: RE: [PATCH v2] eventdev/eth_rx: fix memory leak when token parsing finished Thread-Topic: [PATCH v2] eventdev/eth_rx: fix memory leak when token parsing finished Thread-Index: AQHYGAg/1XAe+kVUJUiapfICqeBpRKx/4h2wgAB1OhA= Date: Wed, 2 Feb 2022 14:54:17 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9bfb82e9-65e3-4da4-65f0-08d9e65be30a x-ms-traffictypediagnostic: MW3PR11MB4619:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:108; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MPA0oJraCljnq0xys7962KlZNnWbmwAT90IddpS2SrSxol7AiRKeomPoHedFVBDaIlC3a7nf4FWzsj6EdN2PadcpZW49KukYElrPF9bTOi+VPoJTyYvr3eRU0h7OjpfxQi8ec8K8kYKgRT13sMreUYzPhmbhI3NlHzeYrmqE095bY9s0EkeK0wJEvbEOM7dgc6UY1bMLGEsSm/eQwPYVoWIUHN094hEG6c8AQZIa5G+ZyE3bqmnmx0jfuqTKIwuElETdneMLl2iw5MXVTXXEsbT1+gA3/ZoblrpXfdHhDur6CSsgOq/CiDB8yYXF7adprIPV+0x1oQsziuH9npH9yZMWVFV7dvutnBQbZXCUJqGA7IBqfPjXorULyf5ZqI6Y26bo12XxaHDLP2IVihKPLvqijLGGvWQidVjKRxUHiypVlfksJKSUNcGfXB19YOkqTSx6bfRJ8mUWo+nEWcuje0kOIuTd8ai+KYCj5z9vru375UfK8LgEbVLrkJrXwSAuCGNy0vmRuLBhM4lcsxgp6TlKOce9pfIh1P1yW8z/bz4ZuZnvgiVd2oAKDRdRUCOewzOd02VmezelSuMSdVsYA9rfH7aFh2prJr1bZ+8h/uqLBxPthzzV+0OYbC+2gnc7NgG3iNLLlde1xt7SNqbVMX8arshoqi3qSKSqrGhqf1Fx+HWzyGCF2oo6ijdjE5XjuCKU0Jq8IsDigEy/Z3V2bw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5911.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(5660300002)(6506007)(33656002)(2940100002)(26005)(55236004)(9686003)(7696005)(2906002)(53546011)(83380400001)(186003)(52536014)(110136005)(316002)(66556008)(76116006)(122000001)(38070700005)(66476007)(6636002)(66946007)(82960400001)(38100700002)(508600001)(4326008)(8676002)(8936002)(71200400001)(66446008)(64756008)(86362001)(55016003)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KbUHURGWm6fx9dbzSOJFcd/MSVn+OPKMWhu79ZYMAq5MRmZgIqV4uRBkNvRl?= =?us-ascii?Q?BxUqauita1r1gGpgntEYgNFXskYw+ypDFxYhKyr/RbXBFFJEfmQbP38cePKc?= =?us-ascii?Q?sILZT6Re0XRH94Z9Sca3bJetx8VfvmxJieirquzR10KGZ8zLx/069cfWWZOb?= =?us-ascii?Q?cI4NqqYJWziIVeU8zIazN3lqWnlA13feppBqgLSwIq4DrCEKPV+P1kNuwfSC?= =?us-ascii?Q?774+dNQehkGNOILLDBjE2cPBjOwOx7V9C9GNjRGbKhlRsDTTWzSM1k6wyvjJ?= =?us-ascii?Q?X49GgED2vrMPWcs4+JPd/XTVXaMI13JtaP2B6j5+pG5mY945JU8ouHPoGDiE?= =?us-ascii?Q?n4f76LwJyBZ1UWLO20n7IEWwZKM9g0N3b9SP6IwDUEidT+SNem/AxAfOe6Oz?= =?us-ascii?Q?t24Eqwezw0s8U4vSbH52cs3PrgRxAGEQr+Udm2uB62A2lkSCAYr4c55EtpN4?= =?us-ascii?Q?KBlI8kgzoabblkjwnOYO8HaKE3s6rvGote2ncggWIMQaZv8jg9C+Xzr8SfJq?= =?us-ascii?Q?AAl/QpDj4SKSKgcFCq1pXmeFfDh1q/A/VaovLC2Bn015RE0rvoZYLtS7a1Jo?= =?us-ascii?Q?m2A/4kjClzvoaGrNwj2mizqsgV6Y5eY4LCKHaMH+wEzyYvPNFfsBghjfSeB0?= =?us-ascii?Q?gohwpsZYKoOeRtkJQXgwZ2S/cR2J5d9YFnUzSItryZnOuyUtos6406mPPn9f?= =?us-ascii?Q?8cNh83kDEW8peUaOxP0rzygOccsh1+QZxZK+iVp9Ztc0nF5EP2xFgP3FU6/v?= =?us-ascii?Q?BTxQpF+YhqnUH3tNxwfleqqo3dTGAejwbr9Gpyy1jwamtbL9pdqRvHlfzUfg?= =?us-ascii?Q?SW9jFGxj/tayaEK8/Om9tUEAg37P1mD8wsLLOjNIAyMdKx8CG7MqPCUDHUCD?= =?us-ascii?Q?Dzd986Sjted4W5u9cdqcYge9ZluSWC2MyYKoDE+zMtA9DLX+U9tY27Zkdhpp?= =?us-ascii?Q?t0kumDWxU4C0faH5RKi+ymc+NCfh28Q3T7Un6vc4+Wj/7OcbMdbsCKiZOwub?= =?us-ascii?Q?KlNAoMblkWlTvUWIjgfECYfZ0eMipS4Xff1gY2TrvfB8zaraMfp2qWfZwzLe?= =?us-ascii?Q?0BPmNGbYCuVdAYsGm9vXnNRNdjw0EHf/omb/RpZ1bgQYhGUpiXRCbCIXI3B3?= =?us-ascii?Q?7YIgIJxTZUrC0o3JIyJjMTeee2k7uK1onToJFE7VJ7B1YMUC4TQy/9zsx1KP?= =?us-ascii?Q?rU4sF+sWecRqmGseN63UEgHqfUQ/rzCHKVMTkZJxcBdkFd4eyV87oFNcvQD4?= =?us-ascii?Q?MXGWJ8nDvsb5ZT+SzFhJBp0cR1HVlO9nslkEF9NCxJjuDXCs4QsyoQjnvCqd?= =?us-ascii?Q?ticIVc1jn3zrY8i5BTYPsN3UvjL9GVu3ZrH9RaF644wzXFaaqqz2lWG6E+Ef?= =?us-ascii?Q?4mRuV8Nbstdcmwo0mjKy1Va+MRUKe5Nsc2xtvITtOIgmvm+UTVfbzQNjpzlo?= =?us-ascii?Q?rasICurWyNJkJZfkooLNpeSOFRk1zi0gmYrfX3zgjaiuhvVNsrIcRa8NJbCf?= =?us-ascii?Q?zS+LVQmACDALLbzuOo66n1pqB2Zwbk7aDMyTjniYKhUwOq4XcXc6kcSJcv4k?= =?us-ascii?Q?0FeP3PpI39x03P/aXFYx4YnNhJdHpBIbbc5DrVUZBVO14fRN0Ae+xzvymZsy?= =?us-ascii?Q?Ic6bVlblgTizEgyQdyelvxzbTJ7vZkK0r60+9BNZ5P4QC7xEljXZJyoKmFmS?= =?us-ascii?Q?Cjk8Bg=3D=3D?= 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: MW4PR11MB5911.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9bfb82e9-65e3-4da4-65f0-08d9e65be30a X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2022 14:54:17.4220 (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: HOJk3NfAFu2iT0NxmKmvvOZqgFPtomVzLla04sHIJEP0l77qywPdBZpRVEaDOxmq3skSgdVcKIw3HBLGE9YylpFBY3TCKVjgdPd+JSqdeOo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4619 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Weigo, Could you please address the below issues also? Thanks, Ganapati > -----Original Message----- > From: Kundapura, Ganapati > Sent: 02 February 2022 13:18 > To: Weiguo Li ; Jayatheerthan, Jay > > Cc: Naga Harish K, S V ; dev@dpdk.org > Subject: RE: [PATCH v2] eventdev/eth_rx: fix memory leak when token > parsing finished >=20 > Acked-by: Ganapati Kundapura >=20 > > -----Original Message----- > > From: Weiguo Li > > Sent: 02 February 2022 13:11 > > To: Jayatheerthan, Jay > > Cc: Kundapura, Ganapati ; Naga Harish K, > > S V ; dev@dpdk.org > > Subject: [PATCH v2] eventdev/eth_rx: fix memory leak when token > > parsing finished > > > > The memory get from strdup should be freed when parameter parsing > > finished, and also should be freed when error occurs. > > > > Fixes: 814d01709328 ("eventdev/eth_rx: support telemetry") > > Fixes: 9e583185318f ("eventdev/eth_rx: support telemetry") > > > > Signed-off-by: Weiguo Li > > --- > > v2: > > * add memory check after strdup > > --- > > lib/eventdev/rte_event_eth_rx_adapter.c | 45 ++++++++++++++++++---- > -- > > - > > 1 file changed, 33 insertions(+), 12 deletions(-) > > > > diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c > > b/lib/eventdev/rte_event_eth_rx_adapter.c > > index ae1e260c08..8519c98b19 100644 > > --- a/lib/eventdev/rte_event_eth_rx_adapter.c > > +++ b/lib/eventdev/rte_event_eth_rx_adapter.c > > @@ -3332,26 +3332,31 @@ handle_rxa_get_queue_conf(const char *cmd > > __rte_unused, > > > > /* Get Rx adapter ID from parameter string */ > > l_params =3D strdup(params); > > + if (l_params =3D=3D NULL) > > + return -ENOMEM; > > token =3D strtok(l_params, ","); Validate token here > > rx_adapter_id =3D strtoul(token, NULL, 10); > > > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(rx_adapter > > _id, -EINVAL); > > > > token =3D strtok(NULL, ","); > > - if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) = { > > + free(l_params); > > return -1; > > - > > + } > > /* Get device ID from parameter string */ > > eth_dev_id =3D strtoul(token, NULL, 10); > > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(eth_dev_id, -EINVAL); Use RTE_ETH_VALID_PORTID_OR_ERR_RET to validate eth_dev_id > > > > token =3D strtok(NULL, ","); > > - if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) = { > > + free(l_params); > > return -1; > > - > > + } > > /* Get Rx queue ID from parameter string */ > > rx_queue_id =3D strtoul(token, NULL, 10); > > if (rx_queue_id >=3D rte_eth_devices[eth_dev_id].data- > > >nb_rx_queues) { > > RTE_EDEV_LOG_ERR("Invalid rx queue_id %u", > rx_queue_id); > > + free(l_params); > > return -EINVAL; > > } > > > > @@ -3359,6 +3364,8 @@ handle_rxa_get_queue_conf(const char *cmd > > __rte_unused, > > if (token !=3D NULL) > > RTE_EDEV_LOG_ERR("Extra parameters passed to eventdev" > > " telemetry command, ignoring"); > > + /* Parsing parameter finished */ > > + free(l_params); > > > > if (rte_event_eth_rx_adapter_queue_conf_get(rx_adapter_id, > > eth_dev_id, > > rx_queue_id, > > &queue_conf)) { > > @@ -3396,26 +3403,31 @@ handle_rxa_get_queue_stats(const char *cmd > > __rte_unused, > > > > /* Get Rx adapter ID from parameter string */ > > l_params =3D strdup(params); > > + if (l_params =3D=3D NULL) > > + return -ENOMEM; > > token =3D strtok(l_params, ","); Validate token here > > rx_adapter_id =3D strtoul(token, NULL, 10); > > > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(rx_adapter > > _id, -EINVAL); > > > > token =3D strtok(NULL, ","); > > - if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) = { > > + free(l_params); > > return -1; > > - > > + } > > /* Get device ID from parameter string */ > > eth_dev_id =3D strtoul(token, NULL, 10); > > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(eth_dev_id, -EINVAL); Use RTE_ETH_VALID_PORTID_OR_ERR_RET to validate eth_dev_id > > > > token =3D strtok(NULL, ","); > > - if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) = { > > + free(l_params); > > return -1; > > - > > + } > > /* Get Rx queue ID from parameter string */ > > rx_queue_id =3D strtoul(token, NULL, 10); > > if (rx_queue_id >=3D rte_eth_devices[eth_dev_id].data- > > >nb_rx_queues) { > > RTE_EDEV_LOG_ERR("Invalid rx queue_id %u", > rx_queue_id); > > + free(l_params); > > return -EINVAL; > > } > > > > @@ -3423,6 +3435,8 @@ handle_rxa_get_queue_stats(const char *cmd > > __rte_unused, > > if (token !=3D NULL) > > RTE_EDEV_LOG_ERR("Extra parameters passed to eventdev" > > " telemetry command, ignoring"); > > + /* Parsing parameter finished */ > > + free(l_params); > > > > if (rte_event_eth_rx_adapter_queue_stats_get(rx_adapter_id, > > eth_dev_id, > > rx_queue_id, &q_stats)) { > > @@ -3458,26 +3472,31 @@ handle_rxa_queue_stats_reset(const char > *cmd > > __rte_unused, > > > > /* Get Rx adapter ID from parameter string */ > > l_params =3D strdup(params); > > + if (l_params =3D=3D NULL) > > + return -ENOMEM; > > token =3D strtok(l_params, ","); Validate token > > rx_adapter_id =3D strtoul(token, NULL, 10); > > > > RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(rx_adapter > > _id, -EINVAL); > > > > token =3D strtok(NULL, ","); > > - if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) = { > > + free(l_params); > > return -1; > > - > > + } > > /* Get device ID from parameter string */ > > eth_dev_id =3D strtoul(token, NULL, 10); > > RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(eth_dev_id, -EINVAL); Use RTE_ETH_VALID_PORTID_OR_ERR_RET to validate eth_dev_id > > > > token =3D strtok(NULL, ","); > > - if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) > > + if (token =3D=3D NULL || strlen(token) =3D=3D 0 || !isdigit(*token)) = { > > + free(l_params); > > return -1; > > - > > + } > > /* Get Rx queue ID from parameter string */ > > rx_queue_id =3D strtoul(token, NULL, 10); > > if (rx_queue_id >=3D rte_eth_devices[eth_dev_id].data- > > >nb_rx_queues) { > > RTE_EDEV_LOG_ERR("Invalid rx queue_id %u", > rx_queue_id); > > + free(l_params); > > return -EINVAL; > > } > > > > @@ -3485,6 +3504,8 @@ handle_rxa_queue_stats_reset(const char *cmd > > __rte_unused, > > if (token !=3D NULL) > > RTE_EDEV_LOG_ERR("Extra parameters passed to eventdev" > > " telemetry command, ignoring"); > > + /* Parsing parameter finished */ > > + free(l_params); > > > > if (rte_event_eth_rx_adapter_queue_stats_reset(rx_adapter_id, > > eth_dev_id, > > -- > > 2.25.1