diff options
author | 2017-06-27 11:52:52 -0700 | |
---|---|---|
committer | 2017-06-27 11:52:52 -0700 | |
commit | be3c7e2a4266979f3ba355aaaa00a1fb4185cc71 (patch) | |
tree | af64c68bdc920b5e8f21d7ce35f87659f11929c9 /src/objective-c/GRPCClient/private | |
parent | 71a78e92cb9f6af405e6f80c9a31c408c4025095 (diff) |
Fix the memory leak in metadata
Diffstat (limited to 'src/objective-c/GRPCClient/private')
-rw-r--r-- | src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 8c8b0b2570..bebfc39af1 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -75,6 +75,10 @@ } - (void)dealloc { + for (int i = 0; i < _op.data.send_initial_metadata.count; i++) { + grpc_slice_unref(_op.data.send_initial_metadata.metadata[i].key); + grpc_slice_unref(_op.data.send_initial_metadata.metadata[i].value); + } gpr_free(_op.data.send_initial_metadata.metadata); } |