aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-03-15 08:07:02 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-03-15 08:07:02 -0700
commit51006fea710ef7e4faefae653432f55947639b76 (patch)
treec6c5b7b7573ab64789f92c5fb7b085a81974c606 /src
parentfb9d11204388b524b942950b47fef24116eab243 (diff)
Fix use-after-free
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/surface/call.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c
index 00719be9ab..9a8870b86a 100644
--- a/src/core/lib/surface/call.c
+++ b/src/core/lib/surface/call.c
@@ -437,9 +437,10 @@ void grpc_call_internal_unref(grpc_exec_ctx *exec_ctx, grpc_call *c REF_ARG) {
static void release_call(grpc_exec_ctx *exec_ctx, void *call,
grpc_error *error) {
grpc_call *c = call;
- grpc_channel_update_call_size_estimate(c->channel,
+ grpc_channel *channel = c->channel;
+ grpc_channel_update_call_size_estimate(channel,
gpr_arena_destroy(c->arena));
- GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, c->channel, "call");
+ GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call");
}
static void set_status_value_directly(grpc_status_code status, void *dest);