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

pull/1/head
Steinar H. Gunderson 18 years ago
parent 47e86f021f
commit 4f438605ca
  1. 6
      ares_destroy.c

@ -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++)
{

Loading…
Cancel
Save