diff options
author | Craig Tiller <ctiller@google.com> | 2017-02-07 15:19:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 15:19:07 -0800 |
commit | c6556af5ec7f89c30f776bf85395c34dd57f363e (patch) | |
tree | d7fc5166e8afef4067275046fe738dac0a2f6742 /src/core/lib | |
parent | ea2c59420c38a4e035c27a1172cb9aaad9c9351c (diff) | |
parent | 93727aaaa767db37f1f30c1eec444b44091c4959 (diff) |
Merge pull request #9588 from ctiller/fuzzing-memory
Add examples from fuzzer server
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/surface/call.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 70bab4c079..a8152964fc 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1483,6 +1483,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, } bctl->send_final_op = 1; call->sent_final_op = 1; + GPR_ASSERT(call->send_extra_metadata_count == 0); call->send_extra_metadata_count = 1; call->send_extra_metadata[0].md = grpc_channel_get_reffed_status_elem( exec_ctx, call->channel, op->data.send_status_from_server.status); @@ -1511,6 +1512,10 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, (int)op->data.send_status_from_server.trailing_metadata_count, op->data.send_status_from_server.trailing_metadata, 1, 1, NULL, 0)) { + for (int n = 0; n < call->send_extra_metadata_count; n++) { + GRPC_MDELEM_UNREF(exec_ctx, call->send_extra_metadata[n].md); + } + call->send_extra_metadata_count = 0; error = GRPC_CALL_ERROR_INVALID_METADATA; goto done_with_error; } |