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