mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-07 19:45:07 +02:00
Ring3: Added FreeProtocolsList().
This commit is contained in:
parent
ca144b0173
commit
85fcc4774c
@ -2736,4 +2736,10 @@ InitializeRing3 (
|
||||
IN LOADED_IMAGE_PRIVATE_DATA *Image
|
||||
);
|
||||
|
||||
VOID
|
||||
EFIAPI
|
||||
FreeProtocolsList (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif
|
||||
|
@ -850,6 +850,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