/* It is the caller's responsibility to check the RootNode has been removed from the tree and is not referencing any other node in the tree. */
STATIC EFI_STATUS EFIAPI AmlDeleteRootNode(IN AML_ROOT_NODE *RootNode)
/* It is the caller's responsibility to check the RootNode has been removed from the tree and is not referencing any other node in the tree. */
STATIC EFI_STATUS EFIAPI AmlDeleteRootNode(IN AML_ROOT_NODE *RootNode)
{
  if (!IS_AML_ROOT_NODE (RootNode)) {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  if ((RootNode->SdtHeader != NULL)) {
    FreePool (RootNode->SdtHeader);
  } else {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  FreePool (RootNode);
  return EFI_SUCCESS;
}