summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorseberg <sebastian@sipsolutions.net>2013-05-31 09:59:29 -0700
committerseberg <sebastian@sipsolutions.net>2013-05-31 09:59:29 -0700
commitdff8c9497b06542712e9666b43ac80b2a30f1d47 (patch)
tree7d949341851bdfa71a039512e7c69f536532e60b /numpy
parent780d829effddc666c480f38eb3c5cc13a98db5a1 (diff)
parentee2f7b4142779e105941a48727c282b3e6991c9e (diff)
downloadnumpy-dff8c9497b06542712e9666b43ac80b2a30f1d47.tar.gz
Merge pull request #3385 from juliantaylor/memleak-3384
BUG: fix memory leak and double execution in dot
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/methods.c4
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;
}