Merge pull request #23728 from markdroth/server_c++_fix

Fix use-after-free bug introduced in #23581.
pull/23690/head^2
Mark D. Roth 4 years ago committed by GitHub
commit 7be8e6a84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/core/lib/surface/server.cc

@ -1115,8 +1115,9 @@ void Server::ChannelData::AcceptStream(void* arg, grpc_transport* /*transport*/,
void Server::ChannelData::FinishDestroy(void* cd, grpc_error* /*error*/) {
auto* chand = static_cast<Server::ChannelData*>(cd);
Server* server = chand->server_.get();
GRPC_CHANNEL_INTERNAL_UNREF(chand->channel_, "server");
chand->server_->Unref();
server->Unref();
}
void Server::ChannelData::Destroy() {

Loading…
Cancel
Save