diff options
author | Craig Tiller <ctiller@google.com> | 2017-07-05 08:37:09 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-07-05 08:37:09 -0700 |
commit | a1a3f363ee0309bdfbcdf919ab57468e3522731a (patch) | |
tree | a4d755c6b8512f47771a23ae8255ccb567391359 /src/csharp/ext/grpc_csharp_ext.c | |
parent | f95873e67632c2b7c323c6613b5e23cae60ecf17 (diff) | |
parent | 7405347cd848f27067b9ce3c029325799ebaa888 (diff) |
Merge github.com:grpc/grpc into optimize_for
Diffstat (limited to 'src/csharp/ext/grpc_csharp_ext.c')
-rw-r--r-- | src/csharp/ext/grpc_csharp_ext.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index f5c0030309..aebce364c5 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -398,8 +398,14 @@ GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_channel_create_call( host_slice = grpc_slice_from_copied_string(host); host_slice_ptr = &host_slice; } - return grpc_channel_create_call(channel, parent_call, propagation_mask, cq, - method_slice, host_slice_ptr, deadline, NULL); + grpc_call *ret = + grpc_channel_create_call(channel, parent_call, propagation_mask, cq, + method_slice, host_slice_ptr, deadline, NULL); + grpc_slice_unref(method_slice); + if (host != NULL) { + grpc_slice_unref(host_slice); + } + return ret; } GPR_EXPORT grpc_connectivity_state GPR_CALLTYPE @@ -790,7 +796,9 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( ops[nops].reserved = NULL; nops++; } - return grpcsharp_call_start_batch(call, ops, nops, ctx, NULL); + grpc_call_error ret = grpcsharp_call_start_batch(call, ops, nops, ctx, NULL); + grpc_slice_unref(status_details_slice); + return ret; } GPR_EXPORT grpc_call_error GPR_CALLTYPE |