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 D92BC740039 for ; Fri, 22 Dec 2023 22:41:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=hhhoGUyl0wRimPpHbJpgV3xc8kHdhqsszqznKJPlX5g=; 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=1703284880; v=1; b=C/Ftjq5wvqFX/lk5SFBB7+1D4OXWGQpWSKusbMjkMnwbyZ4bnrVwgot6S7xCgW9Q0kxR4dgT A1KRUHOIoQe/vhogoYstgxbLCD7jB8/dS7TG6r/Ex8KyQsE8eiNp69YrEagbisqDse2KbTN48mS vWyb8WVXtG8qZ+pcxOClmICM= X-Received: by 127.0.0.2 with SMTP id fQD3YY7687511xOgXKYUlVay; Fri, 22 Dec 2023 14:41:20 -0800 X-Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by mx.groups.io with SMTP id smtpd.web10.34714.1703284879847660371 for ; Fri, 22 Dec 2023 14:41:20 -0800 X-Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2cc7b9281d1so30578031fa.1 for ; Fri, 22 Dec 2023 14:41:19 -0800 (PST) X-Gm-Message-State: u9gu1M4r2J1joDX1bmISh8aUx7686176AA= X-Google-Smtp-Source: AGHT+IHuw0h0mxL3ICIn5TaBfudm+STke/ETXD8XKD0KUsdFAVdD8zbvr2XhC4tGu1wdtJ6J0+3wgw== X-Received: by 2002:a05:6512:92e:b0:50e:51fa:1d3b with SMTP id f14-20020a056512092e00b0050e51fa1d3bmr972254lft.93.1703284877798; Fri, 22 Dec 2023 14:41:17 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id c2-20020a056512074200b0050e6abeb1e4sm246453lfs.170.2023.12.22.14.41.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 22 Dec 2023 14:41:17 -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 v3 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Date: Sat, 23 Dec 2023 01:41:11 +0300 Message-Id: <20231222224113.99793-2-mike.maslenkin@gmail.com> In-Reply-To: <20231222224113.99793-1-mike.maslenkin@gmail.com> References: <20231222224113.99793-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="C/Ftjq5w"; 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: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Nickle Wang Reviewed-by: Abner Chang --- .../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 (#112849): https://edk2.groups.io/g/devel/message/112849 Mute This Topic: https://groups.io/mt/103326960/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-