aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/cpp/client/secure_credentials.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc
index 7fc315bb38..25f6bab7f2 100644
--- a/src/cpp/client/secure_credentials.cc
+++ b/src/cpp/client/secure_credentials.cc
@@ -214,6 +214,10 @@ void MetadataCredentialsPluginWrapper::InvokePlugin(
cb(user_data, md.empty() ? nullptr : &md[0], md.size(),
static_cast<grpc_status_code>(status.error_code()),
status.error_message().c_str());
+ for (auto it = md.begin(); it != md.end(); ++it) {
+ grpc_slice_unref(it->key);
+ grpc_slice_unref(it->value);
+ }
}
MetadataCredentialsPluginWrapper::MetadataCredentialsPluginWrapper(