summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-12-09 13:02:09 -0600
committerGitHub <noreply@github.com>2020-12-09 13:02:09 -0600
commit26f8b11b6e5529789d8e8f6c677ac02432d84f59 (patch)
treee6eacb2c6edc56c77d81b9ccfeafac7d710f2b1e /numpy
parentb6f8b211d79327948d2c6972a62e0700975d613b (diff)
parentc0bc4dd3633e0fe6db8c4eb351da15065500020e (diff)
downloadnumpy-26f8b11b6e5529789d8e8f6c677ac02432d84f59.tar.gz
Merge pull request #17966 from MaiaKaplan/arange_keyword
BUG: Add missing decref to arange
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/multiarraymodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c
index 79956863a..32c5ac0dc 100644
--- a/numpy/core/src/multiarray/multiarraymodule.c
+++ b/numpy/core/src/multiarray/multiarraymodule.c
@@ -2892,6 +2892,7 @@ array_arange(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *kws) {
if (args == NULL || PyTuple_GET_SIZE(args) == 0){
PyErr_SetString(PyExc_TypeError,
"arange() requires stop to be specified.");
+ Py_XDECREF(typecode);
return NULL;
}
}