From 8e457f2c41621a86f917a1acb98efb1196e7571c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 14 Jun 2011 16:33:09 +0200 Subject: [PATCH] Fix incorrect sizeof() in ares_save_options --- ares_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ares_init.c b/ares_init.c index d80b9637..44d4cf93 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++)