aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/client_channel/uri_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/client_channel/uri_parser.c')
-rw-r--r--src/core/ext/client_channel/uri_parser.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c
index f8c946b275..7dd7b753cc 100644
--- a/src/core/ext/client_channel/uri_parser.c
+++ b/src/core/ext/client_channel/uri_parser.c
@@ -262,8 +262,7 @@ grpc_uri *grpc_uri_parse(const char *uri_text, int suppress_errors) {
fragment_end = i;
}
- uri = gpr_malloc(sizeof(*uri));
- memset(uri, 0, sizeof(*uri));
+ uri = gpr_zalloc(sizeof(*uri));
uri->scheme = copy_component(uri_text, scheme_begin, scheme_end);
uri->authority = copy_component(uri_text, authority_begin, authority_end);
uri->path = copy_component(uri_text, path_begin, path_end);