diff --git a/tests/malloc/main.c b/tests/malloc/main.c index 34fa1ccd11..e4ffac5e62 100644 --- a/tests/malloc/main.c +++ b/tests/malloc/main.c @@ -84,7 +84,7 @@ static void free_memory(struct node *head) while (head) { if (head->ptr) { - if (total > CHUNK_SIZE) { + if (total >= CHUNK_SIZE) { total -= CHUNK_SIZE; freed++; }