diff options
author | George Burgess IV <gbiv@google.com> | 2017-07-26 06:46:49 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-07-26 06:46:49 +0000 |
commit | b63e35cc73f9bcc52847243087bc5a30925028c5 (patch) | |
tree | 8d53ec7ed130d32d9b362b1bd73d9ab412d7f9a0 /tests | |
parent | 2b6188d1014f07f3dec3919bb58c05777ad21b8d (diff) | |
parent | f62bcde6a2c7743a868b64f61ddd91180cfe009b (diff) | |
download | extras-b63e35cc73f9bcc52847243087bc5a30925028c5.tar.gz |
Merge "Fix a memory leak" am: 880d4e8574 am: 0b936b1028 am: 04190a8412
am: f62bcde6a2
Change-Id: Ibcd6e31b9104b8c1c2a984b5e31c617e2bf5364c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tcp_nuke_addr/tcp_nuke_addr_test.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/tcp_nuke_addr/tcp_nuke_addr_test.cpp b/tests/tcp_nuke_addr/tcp_nuke_addr_test.cpp index 587f7686..7ac6c69d 100644 --- a/tests/tcp_nuke_addr/tcp_nuke_addr_test.cpp +++ b/tests/tcp_nuke_addr/tcp_nuke_addr_test.cpp @@ -139,12 +139,10 @@ int main() { attempts.store(0); std::thread t0(killSockets, sin, KILL_INTERVAL_MS, &lock); - std::thread *connectThreads[CONNECT_THREADS]; for (size_t i = 0; i < CONNECT_THREADS; i++) { - connectThreads[i] = new std::thread(connectLoop, sin, listensock, &lock, &attempts); + std::thread(connectLoop, sin, listensock, &lock, &attempts).detach(); } - std::thread t1(progressThread, &attempts); - t1.join(); + progressThread(&attempts); return 0; } |