From: yshang1 Date: Fri, 19 Sep 2008 03:42:07 +0000 (+0000) Subject: Bug Fix in DxeSmmDriverEntryLib. X-Git-Tag: edk2-stable201903~20295 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=156eb6bbf7050e211c39677989e358606d65eefe Bug Fix in DxeSmmDriverEntryLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5928 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c b/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c index df25c6d493..539adc1345 100644 --- a/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c +++ b/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c @@ -133,26 +133,14 @@ _DriverUnloadHandler ( EFI_HANDLE ImageHandle ) { - EFI_STATUS Status; - - // - // Call the unload handlers for all the modules // - Status = ProcessModuleUnloadList (ImageHandle); - + // Call the unload handlers for all the modules. + // + // Note: All libraries were constructed in SMM space, + // therefore we can not destruct them in Unload + // handler. // - // If the driver specific unload handler does not return an error, then call all of the - // library destructors. If the unload handler returned an error, then the driver can not be - // unloaded, and the library destructors should not be called - // - if (!EFI_ERROR (Status)) { - ProcessLibraryDestructorList (ImageHandle, gST); - } - - // - // Return the status from the driver specific unload handler - // - return Status; + return ProcessModuleUnloadList (ImageHandle); } /**