mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
MdeModulePkg: Update IP4 driver to check for NULL pointer before using.
Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
parent
7367cc6c24
commit
a5f525fc48
@ -1048,11 +1048,8 @@ Ip4Groups (
|
||||
// is decreamented each time an address is removed..
|
||||
//
|
||||
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
||||
Group = 0;
|
||||
if(IpInstance->Groups != NULL) {
|
||||
Group = IpInstance->Groups[Index - 1];
|
||||
}
|
||||
|
||||
ASSERT (IpInstance->Groups != NULL);
|
||||
Group = IpInstance->Groups[Index - 1];
|
||||
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {
|
||||
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user