diff options
author | Yang Gao <yangg@google.com> | 2015-05-28 14:07:54 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-05-28 14:07:54 -0700 |
commit | 7b49a7737c3d323686ebdac5640672241eae89cb (patch) | |
tree | 719b4534940edac646b79465898bcb6486728b08 /src | |
parent | 40c466583c36f999c573acb721f6162a4359aebf (diff) |
Leak fix, the metadata array should be destroyed on the server SyncRequest
Diffstat (limited to 'src')
-rw-r--r-- | src/cpp/server/server.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index e66b4ed2d8..80eb488b41 100644 --- a/src/cpp/server/server.cc +++ b/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; |