summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher L. Farrow <cfarrow@enthought.com>2011-08-04 15:45:53 -0500
committerCharles Harris <charlesr.harris@gmail.com>2011-10-02 09:09:40 -0600
commit8e606173b3436c641adc07b826866542e7ce5ff7 (patch)
tree54ce9ec7d32c4318fdb398dd8616753ae3d6340b
parent7471adc81aa9312d80ce62bee4485221682d12ef (diff)
downloadnumpy-8e606173b3436c641adc07b826866542e7ce5ff7.tar.gz
BUG: fixing reference leak from the numpy refactor @ 4c21144
-rw-r--r--numpy/core/src/multiarray/ctors.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c
index ac1cdc13a..3f02611f6 100644
--- a/numpy/core/src/multiarray/ctors.c
+++ b/numpy/core/src/multiarray/ctors.c
@@ -3001,6 +3001,7 @@ PyArray_Zeros(int nd, npy_intp *dims, PyArray_Descr *type, int is_f_order)
return NULL;
}
if (_zerofill(ret) < 0) {
+ Py_DECREF(ret);
return NULL;
}
return (PyObject *)ret;