From 106f635552923632f8d1ab67c0ddafd2496f4289 Mon Sep 17 00:00:00 2001 From: LostCivilization Date: Mon, 1 May 2023 07:38:25 +0800 Subject: [PATCH] =?UTF-8?q?[HUST=20CSE]=20=E5=88=A4=E6=96=AD=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=86=97=E4=BD=99=20(#7430)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/utest/testcases/kernel/memheap_tc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/utest/testcases/kernel/memheap_tc.c b/examples/utest/testcases/kernel/memheap_tc.c index a2551032a7..a86ebe6867 100644 --- a/examples/utest/testcases/kernel/memheap_tc.c +++ b/examples/utest/testcases/kernel/memheap_tc.c @@ -58,10 +58,7 @@ static void memheap_test(void) { if (operation == 0) /* free and malloc */ { - if (ptr[ptr_index]) - { - rt_memheap_free(ptr[ptr_index]); - } + rt_memheap_free(ptr[ptr_index]); ptr[ptr_index] = rt_memheap_alloc(&heap1, slice_size); } else /* realloc */