mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
Add missing deferred deinits to math.big.Int.toString (mem leak fix)
This commit is contained in:
parent
68aa221995
commit
b28824ef66
@ -477,9 +477,12 @@ pub const Int = struct {
|
||||
}
|
||||
|
||||
var q = try self.clone();
|
||||
defer q.deinit();
|
||||
q.abs();
|
||||
var r = try Int.init(allocator);
|
||||
defer r.deinit();
|
||||
var b = try Int.initSet(allocator, limb_base);
|
||||
defer b.deinit();
|
||||
|
||||
while (q.len() >= 2) {
|
||||
try Int.divTrunc(&q, &r, q, b);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user