summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher L. Farrow <cfarrow@enthought.com>2011-08-26 21:21:04 -0500
committerCharles Harris <charlesr.harris@gmail.com>2011-10-02 09:09:39 -0600
commit1f20595a834712e2e8451cd10a2b04b638bef72a (patch)
treef9e123912a29c7299b50a7f7f451ebf5b16300ef
parent63dff6b50eeb090fac208ac09cd7e2e977a531ae (diff)
downloadnumpy-1f20595a834712e2e8451cd10a2b04b638bef72a.tar.gz
BUG: fixed reference leak when new record dtype squashed old one in sort
-rw-r--r--numpy/core/src/multiarray/methods.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c
index bd8d1273a..332174318 100644
--- a/numpy/core/src/multiarray/methods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -1268,6 +1268,7 @@ array_sort(PyArrayObject *self, PyObject *args, PyObject *kwds)
return NULL;
}
newd = PyArray_DescrNew(saved);
+ Py_DECREF(newd->names);
newd->names = new_name;
((PyArrayObject_fields *)self)->descr = newd;
}