Skip to content
Snippets Groups Projects
Commit 06eb057e authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

add grpc_slice_unref to fix leaks

parent 52bcda9f
No related branches found
No related tags found
No related merge requests found
...@@ -413,8 +413,14 @@ GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_channel_create_call( ...@@ -413,8 +413,14 @@ GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_channel_create_call(
host_slice = grpc_slice_from_copied_string(host); host_slice = grpc_slice_from_copied_string(host);
host_slice_ptr = &host_slice; host_slice_ptr = &host_slice;
} }
return grpc_channel_create_call(channel, parent_call, propagation_mask, cq, grpc_call *ret =
method_slice, host_slice_ptr, deadline, NULL); 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 GPR_EXPORT grpc_connectivity_state GPR_CALLTYPE
...@@ -805,7 +811,9 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( ...@@ -805,7 +811,9 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server(
ops[nops].reserved = NULL; ops[nops].reserved = NULL;
nops++; 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 GPR_EXPORT grpc_call_error GPR_CALLTYPE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment