From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: ray.ni@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Sun, 02 Jun 2019 23:59:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jun 2019 23:59:12 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 02 Jun 2019 23:59:11 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Jun 2019 23:59:11 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 2 Jun 2019 23:59:11 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.137]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.113]) with mapi id 14.03.0415.000; Mon, 3 Jun 2019 14:59:09 +0800 From: "Ni, Ray" To: "Gao, Zhichao" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Wu, Hao A" , "Zeng, Star" , "Gao, Liming" , Sean Brogan , Michael Turner , Bret Barkelew Subject: Re: [PATCH 2/2] MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery Thread-Topic: [PATCH 2/2] MdeModulePkg/BdsDxe: Use a pcd to control PlatformRecovery Thread-Index: AQHVGde/TaOcdBKQvEyVN6fg8pKL86aJfjSA Date: Mon, 3 Jun 2019 06:59:09 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C18AD13@SHSMSX104.ccr.corp.intel.com> References: <20190603064358.13296-1-zhichao.gao@intel.com> <20190603064358.13296-3-zhichao.gao@intel.com> In-Reply-To: <20190603064358.13296-3-zhichao.gao@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > + // > + // When platform recovery is not enabled, still boot to platform d= efault > file path. > + // > + EfiBootManagerProcessLoadOption (&PlatformDefaultBootOption); > + } > } > + EfiBootManagerFreeLoadOption (&PlatformDefaultBootOption); PlatformDefaultBootOption might be uninitialized if FilePath is NULL. FilePath is NULL when memory allocation fails. So I am thinking maybe ASSERT (FilePath !=3D NULL) is enough when EfiBootManagerInitializeLoadOption(). >=20 > DEBUG ((EFI_D_ERROR, "[Bds] Unable to boot!\n")); > PlatformBootManagerUnableToBoot (); > -- > 2.21.0.windows.1