We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fb17fd commit 06c9e27Copy full SHA for 06c9e27
mypyc/lib-rt/int_ops.c
@@ -590,9 +590,15 @@ double CPyTagged_TrueDivide(CPyTagged x, CPyTagged y) {
590
PyObject *yo = CPyTagged_AsObject(y);
591
PyObject *result = PyNumber_TrueDivide(xo, yo);
592
if (result == NULL) {
593
+ Py_DECREF(xo);
594
+ Py_DECREF(yo);
595
return CPY_FLOAT_ERROR;
596
}
- return PyFloat_AsDouble(result);
597
+ double value = PyFloat_AsDouble(result);
598
599
600
+ Py_DECREF(result);
601
+ return value;
602
603
return 1.0;
604
0 commit comments