mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
Ring3: Added FreeProtocolsList().
This commit is contained in:
parent
cac7056c3e
commit
28221fe295
@ -2748,4 +2748,10 @@ InitializeRing3 (
|
||||
IN LOADED_IMAGE_PRIVATE_DATA *Image
|
||||
);
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
FreeProtocolsList (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
@ -861,6 +861,8 @@ CoreExitBootServices (
|
||||
RING3_INTERFACES_PAGES
|
||||
);
|
||||
|
||||
FreeProtocolsList ();
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,7 @@
|
||||
|
||||
#include "DxeMain.h"
|
||||
#include "SupportedProtocols.h"
|
||||
//
|
||||
// TODO: Free LIST in ExitBootServices
|
||||
//
|
||||
|
||||
LIST_ENTRY mProtocolsHead = INITIALIZE_LIST_HEAD_VARIABLE (mProtocolsHead);
|
||||
|
||||
typedef struct {
|
||||
@ -29,6 +27,22 @@ CallInstallMultipleProtocolInterfaces (
|
||||
IN VOID *Function
|
||||
);
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
FreeProtocolsList (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Link;
|
||||
INTERFACE *Protocol;
|
||||
|
||||
for (Link = mProtocolsHead.BackLink; Link != &mProtocolsHead; Link = mProtocolsHead.BackLink) {
|
||||
Protocol = BASE_CR (Link, INTERFACE, Link);
|
||||
RemoveEntryList (Link);
|
||||
FreePool (Protocol);
|
||||
}
|
||||
}
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
|
Loading…
x
Reference in New Issue
Block a user