Issue #16305: Merge fix from 3.3.

This commit is contained in:
Mark Dickinson 2012-10-25 10:48:39 +01:00
commit 9588593b79
2 changed files with 6 additions and 4 deletions

View File

@ -62,6 +62,9 @@ Core and Builtins
Library
-------
- Issue #16305: Fix a segmentation fault occurring when interrupting
math.factorial.
- Issue #16116: Fix include and library paths to be correct when building C
extensions in venvs.

View File

@ -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 */