Skip to content

Commit 922a6df

Browse files
committed
Make sure to free the stack trace C string when popped
1 parent 217569a commit 922a6df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/PrettyStackTrace/PrettyStackTrace.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ private class PrettyStackTraceManager {
9898
guard let stack = stack else { return }
9999
let prev = stack.pointee.prev
100100
stack.deallocate(capacity: 1)
101+
free(stack.pointee.data)
101102
self.stack = prev
102103
}
103104

0 commit comments

Comments
 (0)