diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c index 1c03351b7509ca7970332abde16b087477ee3703..c8391a786258fdf72d549c78e1390b5a6cc81d93 100644 --- a/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -128,6 +128,7 @@ static void on_done_cb(void *arg, int status, int timeouts, sizeof(grpc_resolved_address) * (*addresses)->naddrs); for (i = prev_naddr; i < (*addresses)->naddrs; i++) { + memset(&(*addresses)->addrs[i], 0, sizeof(grpc_resolved_address)); if (hostent->h_addrtype == AF_INET6) { char output[INET6_ADDRSTRLEN]; gpr_log(GPR_ERROR, "AF_INET6");