/* It is the caller's responsibility to check the NameSpaceRefNode has been removed from any list the node is part of. */
STATIC EFI_STATUS EFIAPI AmlDeleteNameSpaceRefNode(IN AML_NAMESPACE_REF_NODE *NameSpaceRefNode)
/* It is the caller's responsibility to check the NameSpaceRefNode has been removed from any list the node is part of. */
STATIC EFI_STATUS EFIAPI AmlDeleteNameSpaceRefNode(IN AML_NAMESPACE_REF_NODE *NameSpaceRefNode)
{
  if (NameSpaceRefNode == NULL) {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  if (NameSpaceRefNode->RawAbsolutePath != NULL) {
    FreePool ((CHAR8 *)NameSpaceRefNode->RawAbsolutePath);
  } else {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  FreePool (NameSpaceRefNode);
  return EFI_SUCCESS;
}