From 4099c40d9fc97c70a8aaae74d9af5a64c0113da2 Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Thu, 6 Sep 2018 20:05:16 -0700 Subject: [PATCH] Zero out md_index when linked_mdelem is created to fix bug --- src/core/lib/surface/call.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 2923a86646a..def99f5a222 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -954,6 +954,7 @@ static int prepare_application_metadata(grpc_call* call, int count, const grpc_metadata* md = get_md_elem(metadata, additional_metadata, i, count); grpc_linked_mdelem* l = linked_from_md(md); + l->md_index = 0; GPR_ASSERT(sizeof(grpc_linked_mdelem) == sizeof(md->internal_data)); if (!GRPC_LOG_IF_ERROR("validate_metadata", grpc_validate_header_key_is_legal(md->key))) {