Leak fix, the metadata array should be destroyed on the server SyncRequest

pull/1801/head
Yang Gao 10 years ago
parent 40c466583c
commit 7b49a7737c
  1. 4
      src/cpp/server/server.cc

@ -67,6 +67,10 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
grpc_metadata_array_init(&request_metadata_);
}
~SyncRequest() {
grpc_metadata_array_destroy(&request_metadata_);
}
static SyncRequest* Wait(CompletionQueue* cq, bool* ok) {
void* tag = nullptr;
*ok = false;

Loading…
Cancel
Save