commit | fe1770cbad39e42d195a97b37e37ec67df78dcb1 | [log] [tgz] |
---|---|---|
author | Imre Kis <imre.kis@arm.com> | Wed Apr 07 17:51:22 2021 +0200 |
committer | György Szing <gyorgy.szing@arm.com> | Sat Jul 03 08:21:43 2021 +0200 |
tree | 659396b94042ed875d0ad151faa7b363cf5d7ca6 | |
parent | f688a0ba9c4a3872df98273d6535a1281d9e40f1 [diff] |
libsp: Fix memory leak in unit test Call cleanup function from the teardown function of the memory management internals test group to free up the memory used by the mocking system. Change-Id: I103d200746339e478298edeb5cac7cd4e9e20885 Signed-off-by: Imre Kis <imre.kis@arm.com>
diff --git a/components/messaging/ffa/libsp/test/test_sp_memory_management_internals.cpp b/components/messaging/ffa/libsp/test/test_sp_memory_management_internals.cpp index 99366ef..82ac52f 100644 --- a/components/messaging/ffa/libsp/test/test_sp_memory_management_internals.cpp +++ b/components/messaging/ffa/libsp/test/test_sp_memory_management_internals.cpp
@@ -38,6 +38,12 @@ memset(&flags, 0x00, sizeof(flags)); } + TEST_TEARDOWN() + { + mock().checkExpectations(); + mock().clear(); + } + union sp_memory_attr attr; struct sp_memory_transaction_flags flags; };