diff options
author | Craig Tiller <ctiller@google.com> | 2016-12-07 16:25:26 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-12-07 16:25:26 -0800 |
commit | 3153e5af0cda0755d927f281f6561eb52279ced1 (patch) | |
tree | 83162f9d6c7b94cded794d39ff6f74ac207f6025 /src | |
parent | 75731e65a8454d2632acd84a9255facaacc3d424 (diff) |
Fix memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lib/security/transport/server_auth_filter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 4433704cb9..cddc5d9086 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -137,6 +137,10 @@ static void on_md_processing_done( grpc_slice message; grpc_transport_stream_op *close_op = gpr_malloc(sizeof(*close_op)); memset(close_op, 0, sizeof(*close_op)); + for (size_t i = 0; i < calld->md.count; i++) { + grpc_slice_unref_internal(&exec_ctx, calld->md.metadata[i].key); + grpc_slice_unref_internal(&exec_ctx, calld->md.metadata[i].value); + } grpc_metadata_array_destroy(&calld->md); error_details = error_details != NULL ? error_details |