Commit 81249965 authored by Steinar H. Gunderson's avatar Steinar H. Gunderson
Browse files

Moved the NULL check for channel upwards in ares_destroy().

parent 45c6db9a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ void ares_destroy(ares_channel channel)
  struct list_node* list_head;
  struct list_node* list_node;
  
  if (!channel)
    return;

  list_head = &(channel->all_queries);
  for (list_node = list_head->next; list_node != list_head; )
    {
@@ -64,9 +67,6 @@ void ares_destroy(ares_channel channel)
    }
#endif

  if (!channel)
    return;

  if (channel->servers) {
    for (i = 0; i < channel->nservers; i++)
      {