diff options
author | Michael Droettboom <mdboom@gmail.com> | 2011-04-19 12:16:20 -0400 |
---|---|---|
committer | Mark Wiebe <mwwiebe@gmail.com> | 2011-04-22 14:28:25 -0700 |
commit | 0a0ff695f9806e3f4475456bf70f1a789aee7a57 (patch) | |
tree | def6ffd2563a5fd28caeebfb089361779adf9dff | |
parent | fbdc4b737be69ab002957e5bfb0cea9d8a893788 (diff) | |
download | numpy-0a0ff695f9806e3f4475456bf70f1a789aee7a57.tar.gz |
BUG: Fix memory leak in reduction ufuncs -- the error object was not being dereferenced in the non-error case.
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index d25a77732..471700dc0 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -3438,6 +3438,9 @@ finish: if (iter_inner != NULL) { NpyIter_Deallocate(iter_inner); } + + Py_XDECREF(errobj); + return (PyObject *)out; fail: @@ -3826,6 +3829,9 @@ finish: if (iter != NULL) { NpyIter_Deallocate(iter); } + + Py_XDECREF(errobj); + return (PyObject *)out; fail: |