aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2017-12-19 14:59:41 -0800
committerGravatar David Garcia Quintas <dgq@google.com>2017-12-19 14:59:41 -0800
commitc41bbd3c33df25a25014e14fbeee4ced8f1433fa (patch)
tree30b6d245898a53328ecc64a36199e73c8d8e3df5 /src/core/lib
parent0dd982cf4c409d072f2b1c537d65f93001cc0f77 (diff)
Fix wrong unreffing of slice
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/tcp_client_posix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc
index 40ba1623a2..8cd5f8d618 100644
--- a/src/core/lib/iomgr/tcp_client_posix.cc
+++ b/src/core/lib/iomgr/tcp_client_posix.cc
@@ -228,7 +228,8 @@ finish:
gpr_free(error_descr);
gpr_free(desc);
error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS,
- addr_str_slice);
+ addr_str_slice /* takes ownership */);
+ } else {
grpc_slice_unref(addr_str_slice);
}
if (done) {