public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner via groups.io" <abner.chang=amd.com@groups.io>
To: Mike Maslenkin <mike.maslenkin@gmail.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "nicklew@nvidia.com" <nicklew@nvidia.com>,
	"igork@ami.com" <igork@ami.com>
Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH v2 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT
Date: Tue, 19 Dec 2023 03:40:10 +0000	[thread overview]
Message-ID: <MN2PR12MB3966DDB22787A3D7A82D3721EA97A@MN2PR12MB3966.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20231219010023.56603-2-mike.maslenkin@gmail.com>

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Mike Maslenkin <mike.maslenkin@gmail.com>
> Sent: Tuesday, December 19, 2023 9:00 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; nicklew@nvidia.com;
> igork@ami.com; Mike Maslenkin <mike.maslenkin@gmail.com>
> 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 caution
> 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 <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
> Reviewed-by: Nickle Wang <nicklew@nvidia.com>
> ---
>  .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c       | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git
> a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.
> c
> b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.
> c
> index 4cb7621c25c4..0f0b050d7eba 100644
> ---
> a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.
> c
> +++
> b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.
> c
> @@ -3118,7 +3118,9 @@ LeaveFunction:
>      FreePool (ConfigureLangBuffer);
>
>    }
>
>
>
> -  FreePool (ConfigureLangList);
>
> +  if (ConfigureLangList != NULL) {
>
> +    FreePool (ConfigureLangList);
>
> +  }
>
>
>
>    *NumberOfValues = (UINT32)ListCount;
>
>    return FirstEmptyPropKeyValueList;
>
> --
> 2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-12-19  3:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19  1:00 [edk2-devel] [edk2-redfish-client][PATCH v2 0/3] change method for provisioning + minor fixes Mike Maslenkin
2023-12-19  1:00 ` [edk2-devel] [edk2-redfish-client][PATCH v2 1/3] RedfishClientPkg: add check for NULL pointer to avoid ASSERT Mike Maslenkin
2023-12-19  3:40   ` Chang, Abner via groups.io [this message]
2023-12-19  1:00 ` [edk2-devel] [edk2-redfish-client][PATCH v2 2/3] RedfishClientPkg: fix typo in EfiRestJsonStructureProtocolIsReady Mike Maslenkin
2023-12-19  3:40   ` Chang, Abner via groups.io
2023-12-19  1:00 ` [edk2-devel] [edk2-redfish-client][PATCH v2 3/3] RedfishClientPkg: fix access to unitialized variable Mike Maslenkin
2023-12-19  3:40   ` Chang, Abner via groups.io
2023-12-19  2:04 ` [edk2-devel] [edk2-redfish-client][PATCH v2 0/3] change method for provisioning + minor fixes Chang, Abner via groups.io
2023-12-19  2:39   ` Mike Maslenkin
2023-12-19  3:38     ` Chang, Abner via groups.io
2024-01-03  8:33 ` Chang, Abner via groups.io

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR12MB3966DDB22787A3D7A82D3721EA97A@MN2PR12MB3966.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox