diff options
Diffstat (limited to 'mpq/clear.c')
-rw-r--r-- | mpq/clear.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mpq/clear.c b/mpq/clear.c index d4d72c45d..c5baa77f4 100644 --- a/mpq/clear.c +++ b/mpq/clear.c @@ -33,6 +33,7 @@ see https://www.gnu.org/licenses/. */ void mpq_clear (mpq_t x) { - __GMP_FREE_FUNC_LIMBS (PTR(NUM(x)), ALLOC(NUM(x))); + if (ALLOC (NUM(x))) + __GMP_FREE_FUNC_LIMBS (PTR(NUM(x)), ALLOC(NUM(x))); __GMP_FREE_FUNC_LIMBS (PTR(DEN(x)), ALLOC(DEN(x))); } |