From 66c3cc4712d0ab5be4ec1c0a49e72c761c8a3e1b Mon Sep 17 00:00:00 2001 From: Kevin Schoedel <67607049+kpschoedel@users.noreply.github.com> Date: Sun, 21 Nov 2021 11:00:34 -0500 Subject: [PATCH] Fix echo_requester TCP leak (#12031) #### Problem `echo_requester.cpp` leaks TCP endpoints. Instance of #11880 _Possible use of destroyed pool objects_ #### Change overview Shut down `TCPManager`. #### Testing If `ObjectPool` checks that objects do not outlive it (originally part of PR #11698 but deferred due to current leaks), then Cirque CI fails without this change. --- src/messaging/tests/echo/echo_requester.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/messaging/tests/echo/echo_requester.cpp b/src/messaging/tests/echo/echo_requester.cpp index d1936a12b673b5..8929fe3376d1ec 100644 --- a/src/messaging/tests/echo/echo_requester.cpp +++ b/src/messaging/tests/echo/echo_requester.cpp @@ -269,6 +269,7 @@ int main(int argc, char * argv[]) chip::DeviceLayer::PlatformMgr().RunEventLoop(); gUDPManager.Close(); + gTCPManager.Close(); Shutdown();