diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-05-30 20:49:14 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-05-30 20:49:14 +0000 |
commit | f1440b240528afe3dfc03256d92b49acb4ef8537 (patch) | |
tree | 209faa808cec296a6d2398c0160449972c4e5de8 /ares_destroy.c | |
parent | 8c35c65fc7c746d5803a48151e82e0435c20a84c (diff) | |
download | c-ares-f1440b240528afe3dfc03256d92b49acb4ef8537.tar.gz c-ares-f1440b240528afe3dfc03256d92b49acb4ef8537.tar.bz2 c-ares-f1440b240528afe3dfc03256d92b49acb4ef8537.zip |
Brad House added ares_save_options() and ares_destroy_options() that can be
used to keep options for later re-usal when ares_init_options() is used.
Diffstat (limited to 'ares_destroy.c')
-rw-r--r-- | ares_destroy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ares_destroy.c b/ares_destroy.c index fd243c3..8d9bdbc 100644 --- a/ares_destroy.c +++ b/ares_destroy.c @@ -20,6 +20,19 @@ #include "ares.h" #include "ares_private.h" +void ares_destroy_options(struct ares_options *options) +{ + int i; + + free(options->servers); + for (i = 0; i < options->ndomains; i++) + free(options->domains[i]); + free(options->domains); + if(options->sortlist) + free(options->sortlist); + free(options->lookups); +} + void ares_destroy(ares_channel channel) { int i; |