Skip to content

Commit

Permalink
fixes #21062 (#21068)
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq authored Dec 10, 2022
1 parent 2ebd71b commit b59c657
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/system/alloc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,9 @@ when defined(gcDestructors):
while it != nil:
if maxIters == 0:
let rest = it.next.loada
it.next.storea nil
addToSharedFreeList(c, rest)
if rest != nil:
it.next.storea nil
addToSharedFreeList(c, rest)
break
inc x, size
it = it.next.loada
Expand Down

0 comments on commit b59c657

Please sign in to comment.