summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2018-10-10 06:46:57 -0500
committerGitHub <noreply@github.com>2018-10-10 06:46:57 -0500
commitc156bc1dd85af1df733b99b2d1628f95ee0159db (patch)
tree6d29462cb66328bc2306db49a950e66dfd046f87 /numpy/core
parentaae4172f48b4473f6820cdcb44eb66a3e900246c (diff)
parent688314b3250ddc4209d5e1b0ab3758fd400e1a55 (diff)
downloadnumpy-c156bc1dd85af1df733b99b2d1628f95ee0159db.tar.gz
Merge pull request #12127 from charris/fix-memory-leak
BUG: Fix memory leak in mapping.c
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/src/multiarray/mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c
index 038c21c92..d371ae762 100644
--- a/numpy/core/src/multiarray/mapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -1128,8 +1128,8 @@ array_boolean_subscript(PyArrayObject *self,
1, &size, PyArray_STRIDES(ret), PyArray_BYTES(ret),
PyArray_FLAGS(self), (PyObject *)self, (PyObject *)tmp);
+ Py_DECREF(tmp);
if (ret == NULL) {
- Py_DECREF(tmp);
return NULL;
}
}