aboutsummaryrefslogtreecommitdiffstats
path: root/mpfr.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpfr.c')
-rw-r--r--mpfr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mpfr.c b/mpfr.c
index 5a2a35d3..c83a57b3 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -1224,7 +1224,9 @@ do_mpfr_intdiv(int nargs)
} else {
if (! mpfr_number_p(numerator->mpg_numbr)) {
/* [+-]inf or NaN */
- return numerator;
+ unref(numerator);
+ unref(denominator);
+ return make_number((AWKNUM) -1);
}
num = mpg_integer();
@@ -1237,7 +1239,10 @@ do_mpfr_intdiv(int nargs)
} else {
if (! mpfr_number_p(denominator->mpg_numbr)) {
/* [+-]inf or NaN */
- return denominator;
+ unref(numerator);
+ unref(denominator);
+ unref(num);
+ return make_number((AWKNUM) -1);
}
denom = mpg_integer();