From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E46EE210C2D64 for ; Thu, 26 Jul 2018 18:01:13 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 18:01:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,407,1526367600"; d="scan'208";a="243686238" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 26 Jul 2018 18:01:13 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 26 Jul 2018 18:01:13 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 26 Jul 2018 18:01:12 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.100]) with mapi id 14.03.0319.002; Fri, 27 Jul 2018 09:01:11 +0800 From: "Zeng, Star" To: "Ni, Ruiyu" , Thomas Palmer , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH 1/1] MdeModulePkg/PciBusDxe: Fix small memory leak in FreePciDevice Thread-Index: AQHUEuMlxJteH8KPM0qrAA4amyTAV6ST9ScAgA5vgvA= Date: Fri, 27 Jul 2018 01:01:10 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BB890F0@shsmsx102.ccr.corp.intel.com> References: <1530631973-5775-1-git-send-email-thomas.palmer@hpe.com> <03be8cbe-318e-5629-c72b-82e24a3fdc23@Intel.com> In-Reply-To: <03be8cbe-318e-5629-c72b-82e24a3fdc23@Intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/1] MdeModulePkg/PciBusDxe: Fix small memory leak in FreePciDevice X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 01:01:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng and pushed the patch at 07eba7= 069d4c23e9b15caa1e729682a88ddf4ada. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ni, = Ruiyu Sent: Wednesday, July 18, 2018 12:34 PM To: Thomas Palmer ; edk2-devel@lists.01.org Cc: Dong, Eric ; Zeng, Star Subject: Re: [edk2] [PATCH 1/1] MdeModulePkg/PciBusDxe: Fix small memory le= ak in FreePciDevice On 7/3/2018 11:32 PM, Thomas Palmer wrote: > When cleaning the PciIoDevice, also free the BusNumberRange >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Thomas Palmer > --- > MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c=20 > b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c > index ad7a2337f578..48cf57a24f8f 100644 > --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c > +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c > @@ -2,6 +2,7 @@ > Supporting functions implementaion for PCI devices management. > =20 > Copyright (c) 2006 - 2018, Intel Corporation. All rights=20 > reserved.
> +(C) Copyright 2018 Hewlett Packard Enterprise Development LP
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the B= SD License > which accompanies this distribution. The full text of the license=20 > may be found at @@ -105,6 +106,10 @@ FreePciDevice ( > FreePool (PciIoDevice->DevicePath); > } > =20 > + if (PciIoDevice->BusNumberRanges !=3D NULL) { > + FreePool (PciIoDevice->BusNumberRanges); } > + > FreePool (PciIoDevice); > } > =20 >=20 Reviewed-by: Ruiyu Ni -- Thanks, Ray _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel