]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
Add more code robustness check for modules under MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Hand / DriverSupport.c
index 71676d0ef7fa250023d8f8f7db54af2431bae229..56050a1f9fa71ffd677e73cdf7afa6ab271d0b43 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support functions to connect/disconnect UEFI Driver model Protocol\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -766,7 +766,7 @@ CoreDisconnectController (
                &gEfiDriverBindingProtocolGuid,\r
                (VOID **)&DriverBinding\r
                );\r
-    if (EFI_ERROR (Status)) {\r
+    if (EFI_ERROR (Status) || DriverBinding == NULL) {\r
       Status = EFI_INVALID_PARAMETER;\r
       goto Done;\r
     }\r