mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/PciBusDxe: Fix small memory leak in FreePciDevice
When cleaning the PciIoDevice, also free the BusNumberRange Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
b5bd3ed648
commit
07eba7069d
|
@ -2,6 +2,7 @@
|
|||
Supporting functions implementaion for PCI devices management.
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2018 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -105,6 +106,10 @@ FreePciDevice (
|
|||
FreePool (PciIoDevice->DevicePath);
|
||||
}
|
||||
|
||||
if (PciIoDevice->BusNumberRanges != NULL) {
|
||||
FreePool (PciIoDevice->BusNumberRanges);
|
||||
}
|
||||
|
||||
FreePool (PciIoDevice);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue