From: qwang12 Date: Wed, 10 Sep 2008 06:30:40 +0000 (+0000) Subject: Fix a bug by adding CoreReleaseProtocolLock. X-Git-Tag: edk2-stable201903~20354 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=fa3c419fec30282afb85a788cb71e12fd1a51804 Fix a bug by adding CoreReleaseProtocolLock. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5866 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c index 829215ba30..74cc5dfca7 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -143,6 +143,7 @@ CoreConnectController ( // ChildHandleBuffer = AllocatePool (ChildHandleCount * sizeof(EFI_HANDLE)); if (ChildHandleBuffer == NULL) { + CoreReleaseProtocolLock (); return EFI_OUT_OF_RESOURCES; } diff --git a/MdeModulePkg/Core/Dxe/Hand/Notify.c b/MdeModulePkg/Core/Dxe/Hand/Notify.c index 407e3ff8ff..572ba12eed 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Notify.c +++ b/MdeModulePkg/Core/Dxe/Hand/Notify.c @@ -280,10 +280,10 @@ CoreReinstallProtocolInterface ( // CoreNotifyProtocolEntry (ProtEntry); - CoreReleaseProtocolLock (); - Status = EFI_SUCCESS; Done: + CoreReleaseProtocolLock (); + return Status; }