Commit 039e0cdc authored by Mark Dickinson's avatar Mark Dickinson

Issue #16305: Merge fix from 3.2.

parents 9819105e 76464494
...@@ -879,6 +879,9 @@ Core and Builtins ...@@ -879,6 +879,9 @@ Core and Builtins
Library Library
------- -------
- Issue #16305: Fix a segmentation fault occurring when interrupting
math.factorial.
- Issue #9803: Don't close IDLE on saving if breakpoint is open. - Issue #9803: Don't close IDLE on saving if breakpoint is open.
Patch by Roger Serwy. Patch by Roger Serwy.
......
...@@ -1381,14 +1381,13 @@ factorial_odd_part(unsigned long n) ...@@ -1381,14 +1381,13 @@ factorial_odd_part(unsigned long n)
Py_DECREF(outer); Py_DECREF(outer);
outer = tmp; outer = tmp;
} }
Py_DECREF(inner);
goto done; return outer;
error: error:
Py_DECREF(outer); Py_DECREF(outer);
done:
Py_DECREF(inner); Py_DECREF(inner);
return outer; return NULL;
} }
/* Lookup table for small factorial values */ /* Lookup table for small factorial values */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment