Reordered the asserts to first check if the pointer is valid before de-referencing the pointer.
Signed-off-by: Sami Mujawar <sami.muja...@arm.com> --- DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c index 2197e50dc714707f7ed7cc37759d3dba5a45f0e0..a705d771be1a2d59c4b0f645269eb838ff605a1a 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c @@ -90,10 +90,10 @@ FreeSsdtSerialPortTableEx ( UINTN Index; ASSERT (This != NULL); + ASSERT (AcpiTableInfo != NULL); + ASSERT (CfgMgrProtocol != NULL); ASSERT (AcpiTableInfo->TableGeneratorId == This->GeneratorID); ASSERT (AcpiTableInfo->AcpiTableSignature == This->AcpiTableSignature); - ASSERT (CfgMgrProtocol != NULL); - ASSERT (AcpiTableInfo != NULL); if ((Table == NULL) || (*Table == NULL) || -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65451): https://edk2.groups.io/g/devel/message/65451 Mute This Topic: https://groups.io/mt/77014348/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-