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 1DC67940E3F for ; Tue, 19 Dec 2023 01:00:42 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pEunEjPWUjHLJ3PrQLnOkKB3abAjxsEj/Hmk+QqEhlI=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702947641; v=1; b=Mpe0q9EHuNZXtVZ3eLSmNgEPjtjXwAsVWHPcssAGBIRlNWkff2zZQzkMXu2lETR0LiS1AmaZ QgrE345Qgwe/MXrSby31s18SfBVWUj39BRdZVn4LazYzjqdXDQNRyT57UK5RlxROgR0+sZRtDQ/ +H2eUsOw1L/W4yuH3oGhcOHY= X-Received: by 127.0.0.2 with SMTP id IefnYY7687511xsCaB1NaMBS; Mon, 18 Dec 2023 17:00:41 -0800 X-Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mx.groups.io with SMTP id smtpd.web11.402.1702947640873846090 for ; Mon, 18 Dec 2023 17:00:41 -0800 X-Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2cc7d2c1ff0so4846111fa.3 for ; Mon, 18 Dec 2023 17:00:40 -0800 (PST) X-Gm-Message-State: DcRf4QtoKAJ05u1GoZbkVB6kx7686176AA= X-Google-Smtp-Source: AGHT+IGG3YaNWzMqOhpBrLpWy/G+d8OaGUegXxJ+nxeabkEZ9QeohY5n/6KNan7fABX/x5R8qPb8Nw== X-Received: by 2002:a05:651c:1049:b0:2cc:699f:323d with SMTP id x9-20020a05651c104900b002cc699f323dmr1990439ljm.42.1702947639008; Mon, 18 Dec 2023 17:00:39 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id i2-20020a2e8082000000b002cc5c149dd3sm1019032ljg.120.2023.12.18.17.00.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Dec 2023 17:00:38 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [edk2-redfish-client][PATCH v2 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Date: Tue, 19 Dec 2023 04:00:21 +0300 Message-Id: <20231219010023.56603-2-mike.maslenkin@gmail.com> In-Reply-To: <20231219010023.56603-1-mike.maslenkin@gmail.com> References: <20231219010023.56603-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 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,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: 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=Mpe0q9EH; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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/RedfishFeatu= reUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishF= eatureUtilityLib.c index 4cb7621c25c4..0f0b050d7eba 100644 --- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtili= tyLib.c +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtili= tyLib.c @@ -3118,7 +3118,9 @@ LeaveFunction: FreePool (ConfigureLangBuffer);=0D }=0D =0D - FreePool (ConfigureLangList);=0D + if (ConfigureLangList !=3D NULL) {=0D + FreePool (ConfigureLangList);=0D + }=0D =0D *NumberOfValues =3D (UINT32)ListCount;=0D return FirstEmptyPropKeyValueList;=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112658): https://edk2.groups.io/g/devel/message/112658 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] -=-=-=-=-=-=-=-=-=-=-=-