1) Update some comment.
2) Add in handle for the out_of_resource cases 3) Add in Done label to clean up the code. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5853 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -73,6 +73,10 @@ CoreConnectController (
|
||||
AlignedRemainingDevicePath = NULL;
|
||||
if (RemainingDevicePath != NULL) {
|
||||
AlignedRemainingDevicePath = DuplicateDevicePath (RemainingDevicePath);
|
||||
|
||||
if (AlignedRemainingDevicePath == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -138,6 +142,9 @@ CoreConnectController (
|
||||
// Allocate a handle buffer for ControllerHandle's children
|
||||
//
|
||||
ChildHandleBuffer = AllocatePool (ChildHandleCount * sizeof(EFI_HANDLE));
|
||||
if (ChildHandleBuffer == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
//
|
||||
// Fill in a handle buffer with ControllerHandle's children
|
||||
|
Reference in New Issue
Block a user