]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c
MdeModulePkg/PciBusDxe: Fix small memory leak in FreePciDevice
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / PciBusDxe / PciDeviceSupport.c
index ad7a2337f578fd56eee846e874b868ff9eb82aad..48cf57a24f8f4cb2347c0cd05b6ac83483729658 100644 (file)
@@ -2,6 +2,7 @@
   Supporting functions implementaion for PCI devices management.\r
 \r
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Supporting functions implementaion for PCI devices management.\r
 \r
 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -105,6 +106,10 @@ FreePciDevice (
     FreePool (PciIoDevice->DevicePath);\r
   }\r
 \r
     FreePool (PciIoDevice->DevicePath);\r
   }\r
 \r
+  if (PciIoDevice->BusNumberRanges != NULL) {\r
+    FreePool (PciIoDevice->BusNumberRanges);\r
+  }\r
+\r
   FreePool (PciIoDevice);\r
 }\r
 \r
   FreePool (PciIoDevice);\r
 }\r
 \r