From 6f4178878ccc45f365ce72eef6247315e048cf2a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 16 Feb 2017 14:09:39 -0800 Subject: Add zalloc, convert a bunch of files to use it --- src/core/ext/resolver/dns/native/dns_resolver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/ext/resolver/dns/native') diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 2c9623211b..264b2fc347 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -262,8 +262,7 @@ static grpc_resolver *dns_create(grpc_exec_ctx *exec_ctx, char *path = args->uri->path; if (path[0] == '/') ++path; // Create resolver. - dns_resolver *r = gpr_malloc(sizeof(dns_resolver)); - memset(r, 0, sizeof(*r)); + dns_resolver *r = gpr_zalloc(sizeof(dns_resolver)); gpr_mu_init(&r->mu); grpc_resolver_init(&r->base, &dns_resolver_vtable); r->name_to_resolve = gpr_strdup(path); -- cgit v1.2.3