Skip to content
Snippets Groups Projects
Commit 1fe38ffb authored by Julien Boeuf's avatar Julien Boeuf
Browse files

Fixing #3286

- We cannot use call_data after the final callback as this one may
  trigger the deletion of the call object (hence the call_data).
parent 8df85003
No related branches found
No related tags found
No related merge requests found
...@@ -128,9 +128,11 @@ static void on_md_processing_done( ...@@ -128,9 +128,11 @@ static void on_md_processing_done(
calld->num_consumed_md = num_consumed_md; calld->num_consumed_md = num_consumed_md;
grpc_metadata_batch_filter(&calld->md_op->data.metadata, remove_consumed_md, grpc_metadata_batch_filter(&calld->md_op->data.metadata, remove_consumed_md,
elem); elem);
grpc_metadata_array_destroy(&calld->md);
calld->on_done_recv->cb(calld->on_done_recv->cb_arg, 1); calld->on_done_recv->cb(calld->on_done_recv->cb_arg, 1);
} else { } else {
gpr_slice message; gpr_slice message;
grpc_metadata_array_destroy(&calld->md);
error_details = error_details != NULL error_details = error_details != NULL
? error_details ? error_details
: "Authentication metadata processing failed."; : "Authentication metadata processing failed.";
...@@ -139,7 +141,6 @@ static void on_md_processing_done( ...@@ -139,7 +141,6 @@ static void on_md_processing_done(
grpc_transport_stream_op_add_close(&calld->transport_op, status, &message); grpc_transport_stream_op_add_close(&calld->transport_op, status, &message);
grpc_call_next_op(elem, &calld->transport_op); grpc_call_next_op(elem, &calld->transport_op);
} }
grpc_metadata_array_destroy(&calld->md);
} }
static void auth_on_recv(void *user_data, int success) { static void auth_on_recv(void *user_data, int success) {
......
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