diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-05-31 18:36:53 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-05-31 18:38:17 +0200 |
commit | ee2f7b4142779e105941a48727c282b3e6991c9e (patch) | |
tree | 7d949341851bdfa71a039512e7c69f536532e60b /numpy | |
parent | 780d829effddc666c480f38eb3c5cc13a98db5a1 (diff) | |
download | numpy-ee2f7b4142779e105941a48727c282b3e6991c9e.tar.gz |
BUG: fix memory leak and double execution in dot
introduced in 1.8.0dev 914294a42a
closes gh-3384
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/methods.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c index c81f4b1a8..18ff1ec51 100644 --- a/numpy/core/src/multiarray/methods.c +++ b/numpy/core/src/multiarray/methods.c @@ -1868,7 +1868,9 @@ array_dot(PyArrayObject *self, PyObject *args, PyObject *kwds) if (out == NULL) { ret = PyObject_CallMethodObjArgs(numpycore, fname, self, b, NULL); } - ret = PyObject_CallMethodObjArgs(numpycore, fname, self, b, out, NULL); + else { + ret = PyObject_CallMethodObjArgs(numpycore, fname, self, b, out, NULL); + } Py_DECREF(fname); return ret; } |