From b56ca8d555fc6517e274637c7996c051eab99f24 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 24 Apr 2015 17:16:22 -0700 Subject: [PATCH] Fix use-after-free in lame client test --- src/core/surface/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index a65bfb89039..8f1dfa75b81 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -343,12 +343,12 @@ static void destroy_call(void *call, int ignored_success) { for (i = 0; i < c->send_initial_metadata_count; i++) { grpc_mdelem_unref(c->send_initial_metadata[i].md); } + grpc_sopb_destroy(&c->send_ops); + grpc_sopb_destroy(&c->recv_ops); if (c->legacy_state) { destroy_legacy_state(c->legacy_state); } grpc_bbq_destroy(&c->incoming_queue); - grpc_sopb_destroy(&c->send_ops); - grpc_sopb_destroy(&c->recv_ops); gpr_slice_buffer_destroy(&c->incoming_message); gpr_free(c); }