summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2012-10-25 09:47:46 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2012-10-25 09:47:46 (GMT)
commit039e0cdc28ebcea7a6364d6277f11ed330e38028 (patch)
treee01bb8535203e6f4729e3d30f5d97dca345f3201 /Modules/mathmodule.c
parent9819105eed844b2bdf07655fc18a48ffb5812f4b (diff)
parent76464494bc1a6779cc4839a28238fb7ea4104a5a (diff)
downloadcpython-039e0cdc28ebcea7a6364d6277f11ed330e38028.zip
cpython-039e0cdc28ebcea7a6364d6277f11ed330e38028.tar.gz
cpython-039e0cdc28ebcea7a6364d6277f11ed330e38028.tar.bz2
Issue #16305: Merge fix from 3.2.
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index d693da1..3fa52d0 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -1381,14 +1381,13 @@ factorial_odd_part(unsigned long n)
Py_DECREF(outer);
outer = tmp;
}
-
- goto done;
+ Py_DECREF(inner);
+ return outer;
error:
Py_DECREF(outer);
- done:
Py_DECREF(inner);
- return outer;
+ return NULL;
}
/* Lookup table for small factorial values */