MdeModulePkg/NetworkPkg: Checking for NULL pointer before use.
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sivaraman Nainar <sivaramann@amiindia.co.in> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
@@ -1048,8 +1048,11 @@ Ip4Groups (
|
||||
// is decreamented each time an address is removed..
|
||||
//
|
||||
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
||||
Group = IpInstance->Groups[Index - 1];
|
||||
|
||||
Group = 0;
|
||||
if(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;
|
||||
|
Reference in New Issue
Block a user