diff options
author | 2015-04-17 16:46:20 -0700 | |
---|---|---|
committer | 2015-04-17 16:46:20 -0700 | |
commit | eb40a538cbe7e61a26011bdb606c29a8ebebae55 (patch) | |
tree | 435401c86c304c10b286af0482c18b88d334bf61 /src/core/channel/client_channel.c | |
parent | bd22271d00fe419671e787e9f18eb7cc9d8c9367 (diff) |
Fix remaining allocation bugs
Diffstat (limited to 'src/core/channel/client_channel.c')
-rw-r--r-- | src/core/channel/client_channel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c index 4daec40b94..bc481e59ca 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/channel/client_channel.c @@ -130,6 +130,7 @@ static void start_rpc(grpc_call_element *elem, grpc_call_op *op) { gpr_mu_lock(&chand->mu); if (calld->state == CALL_CANCELLED) { gpr_mu_unlock(&chand->mu); + grpc_metadata_batch_destroy(&op->data.metadata); op->done_cb(op->user_data, GRPC_OP_ERROR); return; } @@ -211,6 +212,7 @@ static void cancel_rpc(grpc_call_element *elem, grpc_call_op *op) { child_elem->filter->call_op(child_elem, elem, op); return; /* early out */ case CALL_WAITING: + grpc_metadata_batch_destroy(&calld->s.waiting_op.data.metadata); remove_waiting_child(chand, calld); calld->state = CALL_CANCELLED; gpr_mu_unlock(&chand->mu); @@ -370,6 +372,9 @@ static void destroy_call_elem(grpc_call_element *elem) { if (calld->state == CALL_ACTIVE) { grpc_child_call_destroy(calld->s.active.child_call); } + if (calld->state == CALL_WAITING) { + grpc_metadata_batch_destroy(&calld->s.waiting_op.data.metadata); + } } /* Constructor for channel_data */ |