mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 04:50:29 +00:00
Merge pull request #5391 from blob1807/master
Fix memory leak in `core:math/big.internal_rat_norm`
This commit is contained in:
@@ -157,6 +157,8 @@ internal_rat_norm :: proc(z: ^Rat, allocator := context.allocator) -> (err: Erro
|
||||
z.b.sign = .Zero_or_Positive
|
||||
|
||||
f := &Int{}
|
||||
defer internal_int_destroy(f)
|
||||
|
||||
internal_int_gcd(f, &z.a, &z.b) or_return
|
||||
if !internal_int_equals_digit(f, 1) {
|
||||
f.sign = .Zero_or_Positive
|
||||
|
||||
Reference in New Issue
Block a user