Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,9 @@ void ares_destroy(ares_channel channel)
struct query *query;
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++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment