Browse files

Fix incorrect sizeof() in ares_save_options

  • Loading branch information...
1 parent 654733a commit 8e457f2c41621a86f917a1acb98efb1196e7571c @jhrozek jhrozek committed Jun 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ares_init.c
View
2 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++)

0 comments on commit 8e457f2

Please sign in to comment.