Fix incorrect sizeof() in ares_save_options
authorJakub Hrozek <jhrozek@redhat.com>
Tue, 14 Jun 2011 14:33:09 +0000 (16:33 +0200)
committerJakub Hrozek <jhrozek@redhat.com>
Tue, 14 Jun 2011 14:41:29 +0000 (16:41 +0200)
ares_init.c

index d80b963..44d4cf9 100644 (file)
@@ -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++)