[AMD Official Use Only - General] Reviewed-by: Abner Chang <[email protected]>
> -----Original Message----- > From: Mike Maslenkin <[email protected]> > Sent: Tuesday, December 19, 2023 9:00 AM > To: [email protected] > Cc: Chang, Abner <[email protected]>; [email protected]; > [email protected]; Mike Maslenkin <[email protected]> > 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 <[email protected]> > Cc: Igor Kulchytskyy <[email protected]> > Signed-off-by: Mike Maslenkin <[email protected]> > Reviewed-by: Nickle Wang <[email protected]> > --- > .../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/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
