> -----Original Message-----
> From: Ni, Ray
> Sent: Monday, June 3, 2019 2:59 PM
> To: Gao, Zhichao <zhichao....@intel.com>; devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.w...@intel.com>; Wu, Hao A <hao.a...@intel.com>;
> Zeng, Star <star.z...@intel.com>; Gao, Liming <liming....@intel.com>;
> Sean Brogan <sean.bro...@microsoft.com>; Michael Turner
> <michael.tur...@microsoft.com>; Bret Barkelew
> <bret.barke...@microsoft.com>
> Subject: RE: [PATCH 2/2] MdeModulePkg/BdsDxe: Use a pcd to control
> PlatformRecovery
>
> > + //
> > + // When platform recovery is not enabled, still boot to
> > + platform default
> > file path.
> > + //
> > + EfiBootManagerProcessLoadOption (&PlatformDefaultBootOption);
> > + }
> > }
> > + EfiBootManagerFreeLoadOption (&PlatformDefaultBootOption);
>
> PlatformDefaultBootOption might be uninitialized if FilePath is NULL.
EfiBootManagerFreeLoadOption would check the pointer before free. So it is safe
regardless of the PlatformDefaultBootOption is initialized or not.
>
> FilePath is NULL when memory allocation fails.
> So I am thinking maybe ASSERT (FilePath != NULL) is enough when
> EfiBootManagerInitializeLoadOption().
Maybe it is not enough. The ASSERT only work in DEBUG build. Did I take a
mistake?
Thanks,
Zhichao
>
>
>
> >
> > DEBUG ((EFI_D_ERROR, "[Bds] Unable to boot!\n"));
> > PlatformBootManagerUnableToBoot ();
> > --
> > 2.21.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#41799): https://edk2.groups.io/g/devel/message/41799
Mute This Topic: https://groups.io/mt/31907730/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-