From: Jakub Hrozek Date: Tue, 14 Jun 2011 14:33:09 +0000 (+0200) Subject: Fix incorrect sizeof() in ares_save_options X-Git-Tag: upstream/1.10.0~175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e457f2c41621a86f917a1acb98efb1196e7571c;p=platform%2Fupstream%2Fc-ares.git Fix incorrect sizeof() in ares_save_options --- 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++)