From fa3c419fec30282afb85a788cb71e12fd1a51804 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Wed, 10 Sep 2008 06:30:40 +0000 Subject: [PATCH] Fix a bug by adding CoreReleaseProtocolLock. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5866 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 1 + MdeModulePkg/Core/Dxe/Hand/Notify.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.2