projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47e86f0
)
Moved the NULL check for channel upwards in ares_destroy().
author
Steinar H. Gunderson
<sesse@google.com>
Thu, 4 Oct 2007 08:07:47 +0000
(08:07 +0000)
committer
Steinar H. Gunderson
<sesse@google.com>
Thu, 4 Oct 2007 08:07:47 +0000
(08:07 +0000)
ares_destroy.c
patch
|
blob
|
history
diff --git
a/ares_destroy.c
b/ares_destroy.c
index
1dc2d95
..
ef5cdb8
100644
(file)
--- a/
ares_destroy.c
+++ b/
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++)
{