forked from Archive/PX4-Autopilot
systemcmds/tests: IntrusiveQueue and List fix memory leaks
This commit is contained in:
parent
687a3a15c5
commit
981f8d5d90
|
@ -243,7 +243,7 @@ bool IntrusiveQueueTest::test_remove()
|
||||||
for (auto t : q1) {
|
for (auto t : q1) {
|
||||||
if (t->i == remove_i) {
|
if (t->i == remove_i) {
|
||||||
ut_assert_true(q1.remove(t));
|
ut_assert_true(q1.remove(t));
|
||||||
t = removed;
|
removed = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ bool ListTest::test_remove()
|
||||||
for (auto t : list1) {
|
for (auto t : list1) {
|
||||||
if (t->i == remove_i) {
|
if (t->i == remove_i) {
|
||||||
ut_assert_true(list1.remove(t));
|
ut_assert_true(list1.remove(t));
|
||||||
t = removed;
|
removed = t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue