diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-06-13 15:10:45 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2020-06-13 15:10:45 -0500 |
commit | 74647b34dbf83929a3e66bddfc376c4a53705689 (patch) | |
tree | 4fd7fe2994391f04149c09bc34f587062e40bc90 | |
parent | ccb971d169e75c35ae0360e0949f31d2c0c49107 (diff) | |
download | numpy-74647b34dbf83929a3e66bddfc376c4a53705689.tar.gz |
BUG: Fix reference count leak in mapping.c
This is an oversight by me. It only leaks references, so it is
harmless, but it will show up as a leak when doing a leak check.
-rw-r--r-- | numpy/core/src/multiarray/mapping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 7aefbfc38..f73cb48d9 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -2480,8 +2480,6 @@ PyArray_MapIterCheckIndices(PyArrayMapIterObject *mit) int i; NPY_BEGIN_THREADS_DEF; - intp_type = PyArray_DescrFromType(NPY_INTP); - if (NpyIter_GetIterSize(mit->outer) == 0) { /* * When the outer iteration is empty, the indices broadcast to an @@ -2493,6 +2491,8 @@ PyArray_MapIterCheckIndices(PyArrayMapIterObject *mit) return 0; } + intp_type = PyArray_DescrFromType(NPY_INTP); + NPY_BEGIN_THREADS; for (i=0; i < mit->numiter; i++) { |