aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-07-30 11:38:17 -0700
committerGravatar GitHub <noreply@github.com>2018-07-30 11:38:17 -0700
commit48d05520ac899c10cdbaffe0210adf7657d2b162 (patch)
tree768a77f04f7f4d7ed6dae8dabcdbb7d906a1f0b3
parent7c30042f2b24aea73e2aaf89374a42e8f9827082 (diff)
parent1c47bb45f525d2bf373b08ca9c9080ff5eba2bdb (diff)
Merge pull request #16168 from yashykt/calldestroyasan
Move freeing of error_string to release_call to fix ASAN bug
-rw-r--r--src/core/lib/surface/call.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index 847bb87f7e..dbad5ded4d 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -529,6 +529,7 @@ void grpc_call_internal_unref(grpc_call* c REF_ARG) {
static void release_call(void* call, grpc_error* error) {
grpc_call* c = static_cast<grpc_call*>(call);
grpc_channel* channel = c->channel;
+ gpr_free(static_cast<void*>(const_cast<char*>(c->final_info.error_string)));
grpc_call_combiner_destroy(&c->call_combiner);
grpc_channel_update_call_size_estimate(channel, gpr_arena_destroy(c->arena));
GRPC_CHANNEL_INTERNAL_UNREF(channel, "call");
@@ -573,7 +574,6 @@ static void destroy_call(void* call, grpc_error* error) {
grpc_call_stack_destroy(CALL_STACK_FROM_CALL(c), &c->final_info,
GRPC_CLOSURE_INIT(&c->release_call, release_call, c,
grpc_schedule_on_exec_ctx));
- gpr_free(static_cast<void*>(const_cast<char*>(c->final_info.error_string)));
}
void grpc_call_ref(grpc_call* c) { gpr_ref(&c->ext_ref); }