summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2008-03-28 05:03:50 +0000
committerTravis Oliphant <oliphant@enthought.com>2008-03-28 05:03:50 +0000
commitb8f582defd3c10e5e38018970bb52ab693951dfa (patch)
treeaec333c41746da37166e4717c91567d7c9ca1300 /numpy/core/src/arrayobject.c
parentb30372185f472b29d4b2ac3f703359b9376a8b60 (diff)
downloadnumpy-b8f582defd3c10e5e38018970bb52ab693951dfa.tar.gz
Fix some Py_INCREF's to Py_XINCREF to avoid segfault when NULL is stored.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c
index d9b4c7b90..507ee3c0c 100644
--- a/numpy/core/src/arrayobject.c
+++ b/numpy/core/src/arrayobject.c
@@ -862,7 +862,7 @@ int _flat_copyinto(PyObject *dst, PyObject *src, NPY_ORDER order) {
it = (PyArrayIterObject *)PyArray_IterAllButAxis(src, &axis);
if (it == NULL) {
- if (src != orig_src) Py_DECREF(src);
+ if (src != orig_src) {Py_DECREF(src);}
return -1;
}
@@ -890,7 +890,7 @@ int _flat_copyinto(PyObject *dst, PyObject *src, NPY_ORDER order) {
}
NPY_END_THREADS
- if (src != orig_src) Py_DECREF(src);
+ if (src != orig_src) {Py_DECREF(src);}
Py_DECREF(it);
return 0;
}