aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-07-01 13:55:44 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-07-01 13:55:44 -0700
commit31231348e18e63dbda5673b54c7d39a7e8bfc703 (patch)
treeb709a558ea8a18edfb5096025a82857f26143096
parentb1f220de6f8a50f9e36c57a25cf9123fcd025742 (diff)
Don't unregister resolver object until callback complete
Prevents TSAN races in iomgr shutdown code
-rw-r--r--src/core/iomgr/resolve_address_posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/iomgr/resolve_address_posix.c b/src/core/iomgr/resolve_address_posix.c
index 20d8c58eb4..dbf884c769 100644
--- a/src/core/iomgr/resolve_address_posix.c
+++ b/src/core/iomgr/resolve_address_posix.c
@@ -155,9 +155,9 @@ static void do_request(void *rp) {
grpc_resolve_cb cb = r->cb;
gpr_free(r->name);
gpr_free(r->default_port);
+ cb(arg, resolved);
grpc_iomgr_unregister_object(&r->iomgr_object);
gpr_free(r);
- cb(arg, resolved);
}
void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) {