From 9d7d97b243a5e64f04bd063715cc37ac264fb9fe Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Mon, 27 Jun 2022 16:37:42 -0700 Subject: [PATCH] Fix leak on ares resolver test (#30125) * Fix leak on ares resolver test The pollset was not being properly shutdown. ASAN was failing 100% on resolve_address_using_ares_resolver_test for a month (not identified in CI). * DoNothgin -> nullptr --- test/core/iomgr/resolve_address_test.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/core/iomgr/resolve_address_test.cc b/test/core/iomgr/resolve_address_test.cc index 4d60cc6cd17..99946e304fe 100644 --- a/test/core/iomgr/resolve_address_test.cc +++ b/test/core/iomgr/resolve_address_test.cc @@ -436,9 +436,11 @@ class PollsetSetWrapper { ~PollsetSetWrapper() { grpc_pollset_set_del_pollset(pss_, ps_); + grpc_pollset_set_destroy(pss_); + grpc_pollset_shutdown(ps_, nullptr); + grpc_core::ExecCtx::Get()->Flush(); grpc_pollset_destroy(ps_); gpr_free(ps_); - grpc_pollset_set_destroy(pss_); gpr_log(GPR_DEBUG, "PollsetSetWrapper:%p deleted", this); }