From 241ac1f963defbdc288a3cbc45cf41aedc07e96d Mon Sep 17 00:00:00 2001 From: Laggamer2005 <158077584+Laggamer2005@users.noreply.github.com> Date: Sat, 17 Aug 2024 17:48:16 +0100 Subject: [PATCH] Update memory_test.c --- memory_test.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/memory_test.c b/memory_test.c index 5fcd6fa..76b935f 100644 --- a/memory_test.c +++ b/memory_test.c @@ -16,13 +16,16 @@ void test_malloc() void* a = malloc(16); void* b = malloc(16); - void* c = malloc(16); - + + teqassert(a == b); free(b); + free(a); + c = realloc(c, 32); free(a); free(b); + b = NULL; free(c); b = malloc(16); @@ -32,4 +35,4 @@ void test_malloc() teqassert(startSegAddr == gFirstFreeSegment); teqassert(startSeg.segmentEnd == gFirstFreeSegment->segmentEnd); -} \ No newline at end of file +}