diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-09 02:39:44 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-09-09 02:39:44 +0000 |
commit | 6c857d668cb7d2b219351be1daeec0bcd597e377 (patch) | |
tree | be6b445bc0bec7b636adee9b27e53fd2fd3a2ae9 /MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | |
parent | 599979d4ceb77a61f6636402932f60973ea7f02d (diff) | |
download | edk2-6c857d668cb7d2b219351be1daeec0bcd597e377.tar.gz edk2-6c857d668cb7d2b219351be1daeec0bcd597e377.tar.bz2 edk2-6c857d668cb7d2b219351be1daeec0bcd597e377.zip |
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
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Hand/DriverSupport.c')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c index 9db124c9f3..829215ba30 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -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
|