diff --git a/MdeModulePkg/Core/Dxe/Hand/Locate.c b/MdeModulePkg/Core/Dxe/Hand/Locate.c index d98b55ab93..d2b6da8d6b 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Locate.c +++ b/MdeModulePkg/Core/Dxe/Hand/Locate.c @@ -1,7 +1,7 @@ /** @file Locate handle functions -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -581,7 +581,10 @@ CoreLocateProtocol ( // // Lock the protocol database // - CoreAcquireProtocolLock (); + Status = CoreAcquireLockOrFail (&gProtocolDatabaseLock); + if (EFI_ERROR (Status)) { + return EFI_NOT_FOUND; + } mEfiLocateHandleRequest += 1;