summaryrefslogtreecommitdiff
path: root/ares_init.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-06-14 16:33:09 +0200
committerJakub Hrozek <jhrozek@redhat.com>2011-06-14 16:41:29 +0200
commit8e457f2c41621a86f917a1acb98efb1196e7571c (patch)
tree13f2cca31eec748323e591bc8e533bb4a748d4b1 /ares_init.c
parent654733a3998f0f72a67add9e386e550fe02da2b2 (diff)
downloadc-ares-8e457f2c41621a86f917a1acb98efb1196e7571c.tar.gz
c-ares-8e457f2c41621a86f917a1acb98efb1196e7571c.tar.bz2
c-ares-8e457f2c41621a86f917a1acb98efb1196e7571c.zip
Fix incorrect sizeof() in ares_save_options
Diffstat (limited to 'ares_init.c')
-rw-r--r--ares_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ares_init.c b/ares_init.c
index d80b963..44d4cf9 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -361,7 +361,7 @@ int ares_save_options(ares_channel channel, struct ares_options *options,
ipv4_nservers++;
}
if (ipv4_nservers) {
- options->servers = malloc(ipv4_nservers * sizeof(struct server_state));
+ options->servers = malloc(ipv4_nservers * sizeof(struct in_addr));
if (!options->servers)
return ARES_ENOMEM;
for (i = j = 0; i < channel->nservers; i++)