summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/Ip4Dxe
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/Ip4Dxe')
-rw-r--r--NetworkPkg/Ip4Dxe/Ip4If.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c
index 53a333037f..348f2e076a 100644
--- a/NetworkPkg/Ip4Dxe/Ip4If.c
+++ b/NetworkPkg/Ip4Dxe/Ip4If.c
@@ -491,9 +491,13 @@ Ip4CreateInterface (
IP4_INTERFACE *Interface;
EFI_SIMPLE_NETWORK_MODE SnpMode;
+ if (Mnp == NULL) {
+ return NULL;
+ }
+
Interface = AllocatePool (sizeof (IP4_INTERFACE));
- if ((Interface == NULL) || (Mnp == NULL)) {
+ if (Interface == NULL) {
return NULL;
}