From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8FD7AD80520 for ; Tue, 19 Dec 2023 03:40:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vU4pQrUwh0fetqXT9v9vV7JuP8eR82+g2IJWx5yODVM=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702957213; v=1; b=elxnNQvEcuOQ27UPFu1gxMh4FNqYNi+7+jU9sgs6ovS3aXmrLuIp6ofVIDOt4sPG0M0qSSIR laEaMnY4B2zMwjeLq7Oc++fImxXo20hhXlpwkVxNTUsCRCfueqi2rJOxQDeA7QtcS0sV/YOCyOW JCmNaNjnemXg8UOovCUErcu4= X-Received: by 127.0.0.2 with SMTP id aZlkYY7687511xepsadh3jyn; Mon, 18 Dec 2023 19:40:13 -0800 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.60]) by mx.groups.io with SMTP id smtpd.web11.4851.1702957212579149225 for ; Mon, 18 Dec 2023 19:40:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MMhzkWrJzufi13qVyYAkl9CbVBvUtBk4C/km6e+nnXSxtbwjoEeqH6BmGYlK4WRzCFpilF/PcAaebfCJsgPSGjIK/Sb7MJ66bu6grkBeFjPZJrwklbgFGtAUvvdOvyoXpzGZ1hofRyqE9C1ERt5eQA2dsti0htPSPQDvNDk6hFX0NIbZU/f2ijn66Ten8U5PgRYIqO0c+DMKX3BD5M0/ZsIy+K+bIXL8/HJ4XIHTN0BKsLQMJsLRGWbwI3Zaqs9061U54Sqnvgw2vRkn83FIONuheclNYz66mWVktJj1IhstSyFzzfmpiSHiI5jenoH1qcYX7JjoH93NRh975dTp+w== 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=jZDs2yQq2D1Xp+gXl3aLucIoDQhAxf4Ir2y6Uproahc=; b=daIgLoObpuQDqP5Ls0jJeCiciQSes6tfRxKb7cHR1Rll/WAEf6Nb6LjZyOuacKUnJgRvBKBs/fYeoj/JTsyjKRDuN4eWhoSFwzElduUDEAslGWZTFlCqQ7iK0bPgzNAJUb0IIOuFO/+8+gWU+wqmiELN0lObJ/gGjw/on5JrJu60d1cEwB41EgTIiciuReX/AWAfTlY2+rmOm1JzRv4TmKfYxHNULtyzMLXPeEwE10FyBa8sKiA7DPC+7pzKz9zlihb0Bfhi8Au8h9mXkaPQwNaVviAH0s4BQmb2cLZtN8oQP1FQP2t1ZpPwzcjt5CMGhIfg6u9zI29J0rXr4K+qqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by DM6PR12MB4043.namprd12.prod.outlook.com (2603:10b6:5:216::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 03:40:10 +0000 X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05%5]) with mapi id 15.20.7091.034; Tue, 19 Dec 2023 03:40:10 +0000 From: "Chang, Abner via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" CC: "nicklew@nvidia.com" , "igork@ami.com" Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH v2 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Thread-Topic: [edk2-redfish-client][PATCH v2 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Thread-Index: AQHaMhbLDlJ6Czw86kq4ECGVuE270rCv9fAA Date: Tue, 19 Dec 2023 03:40:10 +0000 Message-ID: References: <20231219010023.56603-1-mike.maslenkin@gmail.com> <20231219010023.56603-2-mike.maslenkin@gmail.com> In-Reply-To: <20231219010023.56603-2-mike.maslenkin@gmail.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=2351251f-434c-4e6b-8330-740bacd42759;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-12-19T03:40:07Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|DM6PR12MB4043:EE_ x-ms-office365-filtering-correlation-id: d09c6c64-d2ff-411e-c4f6-08dc004433b1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: VrSjzfErCt/Y2aqUqN6eenufNymRmqWfqBa5tRyqDeoB70oeZvnpILjGJ/5vHTp/WNC2vCajJLuN9pgqB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waYSZv68qKWlDD2njDto+xM+uAnOjJju6wi9sIiquA27?= =?us-ascii?Q?Y5m3Mofp6avim6OgBpn6abbCmT+EgAxkHh9mvCvTo/Vmkf8Q8nuKbprUL8K8?= =?us-ascii?Q?o5KQl0/NoYmkC0CKeBG5z48jiXDgIGuLAb20NtaRV4yUQ8LWMKTD01UTwMfp?= =?us-ascii?Q?lbez7ETzyNkLzJAbBnX+WBrqhTquOAY3yv97aaYySj+dGl0+VJJOYVRMLOLX?= =?us-ascii?Q?5SBZp9poC49e41KIJUA73C9SXFEAYobSKPDrR7tTVs6rAneugypnXs1V11HT?= =?us-ascii?Q?KJ2unWcXe0CwOFeukdD4BZ0RNtTmb6Mf/nI2FxMpQ7gV3rJhtvznH0MhYvBa?= =?us-ascii?Q?+p4dYc399Td7q2RE2K1o2g/Q7YA8SEmZK14LnEhl?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d09c6c64-d2ff-411e-c4f6-08dc004433b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Dec 2023 03:40:10.4726 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: U4MyNSlXevw7LM3mC1tXxbo9jmSFMYAgTODt8CdIk3Pohy/RWsucKQVODbnq3tTwqmzUeacAzgp4mPn1HlholA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4043 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: h8QpYOP8fgoeNtdWlQasBJ4Ex7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=elxnNQvE; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") [AMD Official Use Only - General] Reviewed-by: Abner Chang > -----Original Message----- > From: Mike Maslenkin > Sent: Tuesday, December 19, 2023 9:00 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nicklew@nvidia.com; > igork@ami.com; Mike Maslenkin > Subject: [edk2-redfish-client][PATCH v2 1/3] RedfishClientPkg: add check = for > NULL pointer to avoid ASSERT > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Initially RedfishPlatformConfigGetConfigureLang could return success > even if ConfigureLangList is empty. After fixing this condition, > RedfishPlatformConfigGetConfigureLang returns an error, but this doesn't > help to avoid ASSERT because the error path is the same as for non-empty > list. > > Cc: Abner Chang > Cc: Igor Kulchytskyy > Signed-off-by: Mike Maslenkin > Reviewed-by: Nickle Wang > --- > .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib. > c > b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib. > c > index 4cb7621c25c4..0f0b050d7eba 100644 > --- > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib. > c > +++ > b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib. > c > @@ -3118,7 +3118,9 @@ LeaveFunction: > FreePool (ConfigureLangBuffer); > > } > > > > - FreePool (ConfigureLangList); > > + if (ConfigureLangList !=3D NULL) { > > + FreePool (ConfigureLangList); > > + } > > > > *NumberOfValues =3D (UINT32)ListCount; > > return FirstEmptyPropKeyValueList; > > -- > 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112675): https://edk2.groups.io/g/devel/message/112675 Mute This Topic: https://groups.io/mt/103255135/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-