Skip to content

Commit

Permalink
Merge pull request #17323 from maribu/tests/malloc
Browse files Browse the repository at this point in the history
tests/malloc: fix counting bugs
  • Loading branch information
fjmolinas authored Dec 3, 2021
2 parents 5ba215f + a6ceeec commit 6475609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/malloc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit 6475609

Please sign in to comment.