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 18B96AC1890 for ; Wed, 21 Feb 2024 20:06:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Y7O1m7mJkumZrHKwPHYMWrlqH2t67sn6cvajWO5Wnxk=; 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=1708545997; v=1; b=pZ/RVyLe1Aux6J+9mXE6s9/DPdI2iD9GAEs30I37EcE/3u3lO110H0YKF7P8ampkCT5TMO5h MJy8cr3vxs2gfWc7r/S7yz6QvQlgOUauXVFQVB9ybXnG2zZzPY26XqeV0N+HMsR32Mmbvvso7jN PptPZwcXo3/6kZrAlKc6u2No= X-Received: by 127.0.0.2 with SMTP id yOFRYY7687511xAC0AZsgGup; Wed, 21 Feb 2024 12:06:37 -0800 X-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web11.1172.1708545996904570292 for ; Wed, 21 Feb 2024 12:06:37 -0800 X-Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-512b13bf764so4759044e87.0 for ; Wed, 21 Feb 2024 12:06:36 -0800 (PST) X-Gm-Message-State: lOLMKxheyHxNE0tBfiVZqrj4x7686176AA= X-Google-Smtp-Source: AGHT+IHjDLIPoHcYRnf0AtBtsqNtzo7hQfxTFz61hQftz2a72Z+rPVXLHEcwcn8pQltMjjmGVdMejg== X-Received: by 2002:a05:6512:690:b0:512:8a57:c87a with SMTP id t16-20020a056512069000b005128a57c87amr17997874lfe.7.1708545994865; Wed, 21 Feb 2024 12:06:34 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id a12-20020a056512020c00b00512da6d23b6sm44973lfo.147.2024.02.21.12.06.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 21 Feb 2024 12:06:34 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: Mike Maslenkin , Nickle Wang , Abner Chang , Igor Kulchytskyy Subject: [edk2-devel] [edk2-redfish-client][PATCH v2 2/4] RedfishClientPkg: refine RedfishExternalResourceResourceFeatureCallback Date: Wed, 21 Feb 2024 23:06:26 +0300 Message-Id: <20240221200628.74174-3-mike.maslenkin@gmail.com> In-Reply-To: <20240221200628.74174-1-mike.maslenkin@gmail.com> References: <20240221200628.74174-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="pZ/RVyLe"; 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 Use local variable for BiosUri passed to HandleResource() to avoid problems in case of Private->Uri is overriden down the call stack. Suggested-by: Nickle Wang Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c b/RedfishC= lientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c index f40f2d85af80..db77ed3dfccb 100644 --- a/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Dxe/BiosDxe.c @@ -670,6 +670,7 @@ RedfishExternalResourceResourceFeatureCallback ( REDFISH_SERVICE RedfishService;=0D REDFISH_RESOURCE_COMMON_PRIVATE *Private;=0D EFI_STRING ResourceUri;=0D + EFI_STRING BiosUri;=0D =0D if (FeatureAction !=3D CallbackActionStartOperation) {=0D return EFI_UNSUPPORTED;=0D @@ -707,19 +708,19 @@ RedfishExternalResourceResourceFeatureCallback ( //=0D // Initialize collection path=0D //=0D - Private->Uri =3D RedfishGetUri (ResourceUri);=0D - if (Private->Uri =3D=3D NULL) {=0D + BiosUri =3D RedfishGetUri (ResourceUri);=0D + if (BiosUri =3D=3D NULL) {=0D ASSERT (FALSE);=0D FreePool (ResourceUri);=0D return EFI_OUT_OF_RESOURCES;=0D }=0D =0D - Status =3D HandleResource (Private, Private->Uri);=0D + Status =3D HandleResource (Private, BiosUri);=0D if (EFI_ERROR (Status)) {=0D - DEBUG ((DEBUG_ERROR, "%a, process external resource: %a failed: %r\n",= __func__, Private->Uri, Status));=0D + DEBUG ((DEBUG_ERROR, "%a, process external resource: %s failed: %r\n",= __func__, BiosUri, Status));=0D }=0D =0D - FreePool (Private->Uri);=0D + FreePool (BiosUri);=0D FreePool (ResourceUri);=0D return Status;=0D }=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115736): https://edk2.groups.io/g/devel/message/115736 Mute This Topic: https://groups.io/mt/104495956/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-