From cecb4543c328b5a8216d9665508946717d48d0f3 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 12 Apr 2024 00:54:54 -0700 Subject: [PATCH] Util: Remember to free memory in tests --- src/util/test/circle-buffer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util/test/circle-buffer.c b/src/util/test/circle-buffer.c index ff580e23e..0415f83a1 100644 --- a/src/util/test/circle-buffer.c +++ b/src/util/test/circle-buffer.c @@ -30,6 +30,8 @@ M_TEST_DEFINE(basicCircle) { assert_int_equal(CircleBufferRead8(&buffer, &value), 1); assert_int_equal(value, i); } + + CircleBufferDeinit(&buffer); } M_TEST_DEFINE(basicAlignment16) { @@ -59,6 +61,8 @@ M_TEST_DEFINE(basicAlignment16) { assert_int_equal(CircleBufferRead16(&buffer, &value), 2); assert_int_equal(value, i); } + + CircleBufferDeinit(&buffer); } @@ -113,6 +117,8 @@ M_TEST_DEFINE(basicAlignment32) { assert_int_equal(CircleBufferRead32(&buffer, &value), 4); assert_int_equal(value, i); } + + CircleBufferDeinit(&buffer); } M_TEST_DEFINE(capacity) { @@ -140,6 +146,8 @@ M_TEST_DEFINE(capacity) { assert_int_equal(CircleBufferRead8(&buffer, &value), 1); assert_int_equal(value, i); } + + CircleBufferDeinit(&buffer); } M_TEST_DEFINE(overCapacity16) { @@ -152,6 +160,8 @@ M_TEST_DEFINE(overCapacity16) { assert_int_equal(CircleBufferWrite8(&buffer, i), 1); } assert_int_equal(CircleBufferWrite16(&buffer, 0xFFFF), 0); + + CircleBufferDeinit(&buffer); } M_TEST_SUITE_DEFINE(CircleBuffer,