diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-10-10 06:46:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 06:46:57 -0500 |
commit | c156bc1dd85af1df733b99b2d1628f95ee0159db (patch) | |
tree | 6d29462cb66328bc2306db49a950e66dfd046f87 /numpy/core | |
parent | aae4172f48b4473f6820cdcb44eb66a3e900246c (diff) | |
parent | 688314b3250ddc4209d5e1b0ab3758fd400e1a55 (diff) | |
download | numpy-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.c | 2 |
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; } } |