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.151; helo=mga17.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 DB1FE202E5483 for ; Fri, 6 Jul 2018 04:18:53 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 04:18:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,315,1526367600"; d="scan'208";a="55580336" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga006.jf.intel.com with ESMTP; 06 Jul 2018 04:18:36 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Jul 2018 04:18:36 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Jul 2018 04:18:36 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.81]) with mapi id 14.03.0319.002; Fri, 6 Jul 2018 19:18:34 +0800 From: "Zeng, Star" To: "Bi, Dandan" , Thomas Palmer , "edk2-devel@lists.01.org" CC: "Dong, Eric" , "Zeng, Star" Thread-Topic: [edk2] [PATCH 1/1] MdeModulePkg/DisplayEngineDxe: Fix small InitializeDisplayEngine leak Thread-Index: AQHUEu1XM96juYS0XEuSnrdhHuzEJqSBVeGAgAC6LNA= Date: Fri, 6 Jul 2018 11:18:33 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BB7B9D9@shsmsx102.ccr.corp.intel.com> References: <1530636361-6450-1-git-send-email-thomas.palmer@hpe.com> <3C0D5C461C9E904E8F62152F6274C0BB3BB46519@shsmsx102.ccr.corp.intel.com> In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB3BB46519@shsmsx102.ccr.corp.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/DisplayEngineDxe: Fix small InitializeDisplayEngine leak 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, 06 Jul 2018 11:18:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng And pushed patch at 9090c8b533013078c6df773e128070c76d917830. Thanks, Star -----Original Message----- From: Bi, Dandan=20 Sent: Friday, July 6, 2018 4:11 PM To: Thomas Palmer ; edk2-devel@lists.01.org Cc: Dong, Eric ; Zeng, Star Subject: RE: [edk2] [PATCH 1/1] MdeModulePkg/DisplayEngineDxe: Fix small In= itializeDisplayEngine leak Reviewed-by: Dandan Bi Thanks, Dandan -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Thom= as Palmer Sent: Wednesday, July 4, 2018 12:46 AM To: edk2-devel@lists.01.org Cc: Dong, Eric ; Zeng, Star Subject: [edk2] [PATCH 1/1] MdeModulePkg/DisplayEngineDxe: Fix small Initia= lizeDisplayEngine leak After calling RegisterHotKey, the allocated memory in NewString should be f= reed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Thomas Palmer --- MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeMod= ulePkg/Universal/DisplayEngineDxe/FormDisplay.c index f2eac4d3fece..7390f954b67f 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -4221,11 +4221,13 @@ InitializeDisplayEngine ( NewString =3D HiiGetString (gHiiHandle, STRING_TOKEN (FUNCTION= _TEN_STRING), NULL); ASSERT (NewString !=3D NULL); FormBrowserEx2->RegisterHotKey (&HotKey, BROWSER_ACTION_SUBMIT, 0, New= String); + FreePool (NewString); =20 HotKey.ScanCode =3D SCAN_F9; NewString =3D HiiGetString (gHiiHandle, STRING_TOKEN (FUNCTION= _NINE_STRING), NULL); ASSERT (NewString !=3D NULL); FormBrowserEx2->RegisterHotKey (&HotKey, BROWSER_ACTION_DEFAULT, EFI_H= II_DEFAULT_CLASS_STANDARD, NewString); + FreePool (NewString); } =20 return EFI_SUCCESS; -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel