aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/security
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-09-08 17:21:05 -0700
committerGravatar Julien Boeuf <jboeuf@google.com>2015-09-08 17:21:05 -0700
commit1fe38ffb7476df086c7d470e7f136dda92610c8e (patch)
tree4533394e055853176dd1433d38058ceb1de41fa8 /src/core/security
parent8df85003f8a6d202c0b0f4506ced9e4f4204f30d (diff)
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).
Diffstat (limited to 'src/core/security')
-rw-r--r--src/core/security/server_auth_filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/security/server_auth_filter.c b/src/core/security/server_auth_filter.c
index b767f85498..d134201e87 100644
--- a/src/core/security/server_auth_filter.c
+++ b/src/core/security/server_auth_filter.c
@@ -128,9 +128,11 @@ static void on_md_processing_done(
calld->num_consumed_md = num_consumed_md;
grpc_metadata_batch_filter(&calld->md_op->data.metadata, remove_consumed_md,
elem);
+ grpc_metadata_array_destroy(&calld->md);
calld->on_done_recv->cb(calld->on_done_recv->cb_arg, 1);
} else {
gpr_slice message;
+ grpc_metadata_array_destroy(&calld->md);
error_details = error_details != NULL
? error_details
: "Authentication metadata processing failed.";
@@ -139,7 +141,6 @@ static void on_md_processing_done(
grpc_transport_stream_op_add_close(&calld->transport_op, status, &message);
grpc_call_next_op(elem, &calld->transport_op);
}
- grpc_metadata_array_destroy(&calld->md);
}
static void auth_on_recv(void *user_data, int success) {