]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c
MdeModulePkg: Fix IPv4 double free
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Config2Nv.c
index 27dae5855380ea7caf93e8133bf19cfa92fa11ea..381dcb1e974a706a2a46c68a6e9a1a05c3dfbf23 100644 (file)
@@ -874,6 +874,10 @@ Ip4FormExtractConfig (
   EFI_STRING                       FormResult;\r
   UINTN                            Size;\r
   UINTN                            BufferSize;\r
+\r
+  if (Progress == NULL || Results == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
   \r
   Status             = EFI_SUCCESS; \r
   IfrFormNvData      = NULL;\r
@@ -887,10 +891,6 @@ Ip4FormExtractConfig (
   BufferSize         = sizeof (IP4_CONFIG2_IFR_NVDATA);\r
   *Progress          = Request;\r
   \r
-  if (Progress == NULL || Results == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
-  }\r
-  \r
   //\r
   // Check Request data in <ConfigHdr>.\r
   //\r