diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-05-23 20:25:31 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-05-23 20:25:31 +0000 |
commit | b429ae58defaaccfc7aecf7b07d193a60da38d38 (patch) | |
tree | 0fa7857e8b461bcea80bf707864588ac21fa17a1 /numpy/core/src/arraymethods.c | |
parent | 8f0db8c41c17af95900c0cdfe71aa6916b5094c3 (diff) | |
download | numpy-b429ae58defaaccfc7aecf7b07d193a60da38d38.tar.gz |
Properly decrement references for _internal.py imports
Diffstat (limited to 'numpy/core/src/arraymethods.c')
-rw-r--r-- | numpy/core/src/arraymethods.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/src/arraymethods.c b/numpy/core/src/arraymethods.c index 26c45e839..3a1b0c37d 100644 --- a/numpy/core/src/arraymethods.c +++ b/numpy/core/src/arraymethods.c @@ -883,6 +883,7 @@ array_sort(PyArrayObject *self, PyObject *args, PyObject *kwds) if (_numpy_internal == NULL) return NULL; new_name = PyObject_CallMethod(_numpy_internal, "_newnames", "OO", saved, order); + Py_DECREF(_numpy_internal); if (new_name == NULL) return NULL; newd = PyArray_DescrNew(saved); newd->names = new_name; @@ -928,6 +929,7 @@ array_argsort(PyArrayObject *self, PyObject *args, PyObject *kwds) if (_numpy_internal == NULL) return NULL; new_name = PyObject_CallMethod(_numpy_internal, "_newnames", "OO", saved, order); + Py_DECREF(_numpy_internal); if (new_name == NULL) return NULL; newd = PyArray_DescrNew(saved); newd->names = new_name; |