From 738e91e8d1f4f942f486fad319fb9a62df81c8e2 Mon Sep 17 00:00:00 2001 From: Hongyu Chen Date: Tue, 13 Oct 2015 15:05:00 -0700 Subject: Fix call data init in census grpc filter. --- src/core/census/grpc_filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/census/grpc_filter.c b/src/core/census/grpc_filter.c index 3545307b66..872543057e 100644 --- a/src/core/census/grpc_filter.c +++ b/src/core/census/grpc_filter.c @@ -132,6 +132,7 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *initial_op) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); + memset(d, 0, sizeof(*d)); d->start_ts = gpr_now(GPR_CLOCK_REALTIME); if (initial_op) client_mutate_op(elem, initial_op); } @@ -149,6 +150,7 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *initial_op) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); + memset(d, 0, sizeof(*d)); d->start_ts = gpr_now(GPR_CLOCK_REALTIME); /* TODO(hongyu): call census_tracing_start_op here. */ grpc_closure_init(d->on_done_recv, server_on_done_recv, elem); -- cgit v1.2.3