aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-23 14:30:05 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-11-23 14:30:05 -0800
commit5059ddf58b36f1a66e4ee1cee1486362ab8cdd1f (patch)
treedc0da73285ebbcfcb9a64d202cc4f893d7aaee69 /src/core/lib/surface
parent70b32393189fd29ba5805906eab6115ad626f3ce (diff)
Fix memory leak, uninitialized memory
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r--src/core/lib/surface/server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c
index 6de4ff1747..72ec48f4d9 100644
--- a/src/core/lib/surface/server.c
+++ b/src/core/lib/surface/server.c
@@ -750,6 +750,11 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr,
GRPC_MDVALUE(calld->recv_initial_metadata->idx.named.authority->md));
calld->path_set = true;
calld->host_set = true;
+ grpc_metadata_batch_remove(exec_ctx, calld->recv_initial_metadata,
+ calld->recv_initial_metadata->idx.named.path);
+ grpc_metadata_batch_remove(
+ exec_ctx, calld->recv_initial_metadata,
+ calld->recv_initial_metadata->idx.named.authority);
} else {
GRPC_ERROR_REF(error);
}