Skip to content

Commit

Permalink
avoid memory leak in mallocarrays linked list
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Jan 2, 2025
1 parent 45d3238 commit 2adfacc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,7 @@ static void sweep_malloced_memory(void) JL_NOTSAFEPOINT
*pma = nxt;
int isaligned = (uintptr_t)ma->a & 1;
jl_gc_free_memory(a, isaligned);
ma->next = ptls2->heap.mafreelist;
ptls2->heap.mafreelist = ma;
free(ma);
}
gc_time_count_mallocd_memory(bits);
ma = nxt;
Expand Down

0 comments on commit 2adfacc

Please sign in to comment.