diff options
Diffstat (limited to 'ares/ares_destroy.c')
-rw-r--r-- | ares/ares_destroy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ares/ares_destroy.c b/ares/ares_destroy.c index 1dc2d95cd..ef5cdb8bc 100644 --- a/ares/ares_destroy.c +++ b/ares/ares_destroy.c @@ -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++) { |