From 981f8d5d904f303c14348dea7d183cd8ecba456a Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 20 Oct 2019 10:46:44 -0400 Subject: [PATCH] systemcmds/tests: IntrusiveQueue and List fix memory leaks --- src/systemcmds/tests/test_IntrusiveQueue.cpp | 2 +- src/systemcmds/tests/test_List.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/systemcmds/tests/test_IntrusiveQueue.cpp b/src/systemcmds/tests/test_IntrusiveQueue.cpp index ff04f126eb..0c5d1fc24f 100644 --- a/src/systemcmds/tests/test_IntrusiveQueue.cpp +++ b/src/systemcmds/tests/test_IntrusiveQueue.cpp @@ -243,7 +243,7 @@ bool IntrusiveQueueTest::test_remove() for (auto t : q1) { if (t->i == remove_i) { ut_assert_true(q1.remove(t)); - t = removed; + removed = t; } } diff --git a/src/systemcmds/tests/test_List.cpp b/src/systemcmds/tests/test_List.cpp index c784aa4bd0..23329fe028 100644 --- a/src/systemcmds/tests/test_List.cpp +++ b/src/systemcmds/tests/test_List.cpp @@ -136,7 +136,7 @@ bool ListTest::test_remove() for (auto t : list1) { if (t->i == remove_i) { ut_assert_true(list1.remove(t)); - t = removed; + removed = t; } }