aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-29 06:43:31 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-05-29 06:43:31 -0700
commit1c6c1e432265d057865d4e8932175d56d787299d (patch)
tree20ecfd90e7abfeff45d26a9f6f9350409348500d
parent89c01053901cc2d21e970880acbc3da8b14494cf (diff)
parent7b49a7737c3d323686ebdac5640672241eae89cb (diff)
Merge pull request #1801 from yang-g/test
Leak fix, the metadata array should be destroyed on the server SyncRe…
-rw-r--r--src/cpp/server/server.cc4
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;