mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
Free memory
This commit is contained in:
parent
132c745330
commit
8bf60e9239
1 changed files with 3 additions and 0 deletions
|
@ -2653,6 +2653,9 @@ double string2rational(void *data, char *s)
|
|||
Cyc_rt_raise2(data, "Error converting string to bignum", denom);
|
||||
}
|
||||
|
||||
// Prevent memory leak
|
||||
free(nom);
|
||||
|
||||
// Compute final result as double
|
||||
double x = mp_get_double(&bignum_value(bn_nom));
|
||||
double y = mp_get_double(&bignum_value(bn_denom));
|
||||
|
|
Loading…
Add table
Reference in a new issue