Reviewed-by: Ruiyu Ni <[email protected]> Regards, Ray
>-----Original Message----- >From: edk2-devel [mailto:[email protected]] On Behalf Of Daniil >Egranov >Sent: Wednesday, May 4, 2016 9:34 AM >To: [email protected] >Cc: Fan, Jeff <[email protected]> >Subject: [edk2] [PATCH v2 1/3] IntelFrameworkModulePkg/GenericBdsLib: Check >for invalid device handle > >Added error control for invalid device handle when LocateDevicePath() >fails. > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Daniil Egranov <[email protected]> >--- > IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c >b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c >index 68b32f3..330d6b5 100644 >--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c >+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c >@@ -3626,7 +3626,11 @@ BdsLibGetBootableHandle ( > // > UpdatedDevicePath = DevicePath; > Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, > &UpdatedDevicePath, &Handle); >- gBS->ConnectController (Handle, NULL, NULL, TRUE); >+ if (!EFI_ERROR (Status)) { >+ gBS->ConnectController (Handle, NULL, NULL, TRUE); >+ } else { >+ return (EFI_HANDLE) NULL; >+ } > } > } else { > // >-- >2.7.4 > >_______________________________________________ >edk2-devel mailing list >[email protected] >https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

