aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/client_config/resolvers
diff options
context:
space:
mode:
authorGravatar Hongwei Wang <hongweiw@google.com>2015-07-21 16:29:34 -0700
committerGravatar Hongwei Wang <hongweiw@google.com>2015-07-21 16:29:34 -0700
commit00de69835549d4504d9b38ad9278919d6bf0b964 (patch)
tree66b4a043f106a011d4fdbe070e6b16ab16106c13 /src/core/client_config/resolvers
parentca2e32d12d1e16569411a55f58cdbba10a71aed7 (diff)
Fix memory leak by free address.
Diffstat (limited to 'src/core/client_config/resolvers')
-rw-r--r--src/core/client_config/resolvers/zookeeper_resolver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c
index c7eb760fe9..63c68a2432 100644
--- a/src/core/client_config/resolvers/zookeeper_resolver.c
+++ b/src/core/client_config/resolvers/zookeeper_resolver.c
@@ -257,6 +257,7 @@ static void zookeeper_get_children_node_completion(int rc, const char *value, in
if (address != NULL) {
/* Further resolve address by DNS */
grpc_resolve_address(address, NULL, zookeeper_dns_resolved, r);
+ gpr_free(address);
} else {
gpr_mu_lock(&r->mu);
r->resolved_total--;
@@ -275,7 +276,7 @@ static void zookeeper_get_children_completion(int rc, const struct String_vector
char path[GRPC_MAX_ZOOKEEPER_BUFFER_SIZE];
int i;
zookeeper_resolver *r = (zookeeper_resolver *)arg;
-
+
if (rc) {
gpr_log(GPR_ERROR, "Error in getting zookeeper children of %s", r->name);
return;