From f6d2f1fa1bf732b1dfbdb9c24870c02b5b1642dd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 30 Jun 2015 12:33:29 -0700 Subject: [PATCH] Fix leaking unclaimed incoming metadata --- src/core/transport/chttp2/incoming_metadata.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/transport/chttp2/incoming_metadata.c index e81927ab200..a4b7174329b 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/transport/chttp2/incoming_metadata.c @@ -47,6 +47,10 @@ void grpc_chttp2_incoming_metadata_buffer_init( void grpc_chttp2_incoming_metadata_buffer_destroy( grpc_chttp2_incoming_metadata_buffer *buffer) { + size_t i; + for (i = 0; i < buffer->count; i++) { + grpc_mdelem_unref(buffer->elems[i].md); + } gpr_free(buffer->elems); }