diff options
author | David Garcia Quintas <dgq@google.com> | 2016-05-02 10:56:54 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-05-02 10:56:54 -0700 |
commit | 80721b20ca574df78e7e884a023425274e964a17 (patch) | |
tree | 3f18a170c1cdc49af7c48a787170a818eb2efa0f /src/core/lib/channel/channel_stack.c | |
parent | 1b2db6333d4783e18b8d72db7893a758c4fcd2b9 (diff) | |
parent | 1dd74dd3783daa3ac427add91b3b81deb7758200 (diff) |
Merge branch 'master' of github.com:grpc/grpc into codegen_remove_proto
Diffstat (limited to 'src/core/lib/channel/channel_stack.c')
-rw-r--r-- | src/core/lib/channel/channel_stack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index e36066d863..ad182d1f69 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -213,14 +213,16 @@ void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset) {} -void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { +void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, + void *and_free_memory) { grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); size_t count = stack->count; size_t i; /* destroy per-filter data */ for (i = 0; i < count; i++) { - elems[i].filter->destroy_call_elem(exec_ctx, &elems[i]); + elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], + i == count - 1 ? and_free_memory : NULL); } } |