Coverity: fix allocation size as reported in new code

pull/657/head
Brad House 1 year ago
parent 58c7940e0b
commit f2d567f018
  1. 5
      src/lib/ares__iface_ips.c

@ -201,8 +201,9 @@ static ares_status_t
size_t alloc_size;
alloc_size = ares__round_up_pow2(ips->alloc_size + 1);
temp = ares_realloc_zero(ips->ips, ips->alloc_size * sizeof(ips->ips),
alloc_size * sizeof(ips->ips));
temp = ares_realloc_zero(ips->ips,
ips->alloc_size * sizeof(*ips->ips),
alloc_size * sizeof(*ips->ips));
if (temp == NULL) {
return ARES_ENOMEM;
}

Loading…
Cancel
Save