From fb80601afb543beedebc261e64c68f5471fc075c Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Tue, 25 Jul 2023 19:38:21 -0600 Subject: [PATCH] BUG: Fix use of renamed variable. In gh-22449 `descr` was renamed `dtype`, which broke the build as gh-24211 decrefed the old variable to fix a reference leak. This bug slipped in because gh-22449 was not retested after the merge. --- numpy/core/src/multiarray/scalartypes.c.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index 47553ff8a9dd..2976e065bb78 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -319,7 +319,7 @@ genint_type_str(PyObject *self) item = gentype_generic_method(self, NULL, NULL, "item"); break; } - Py_DECREF(descr); + Py_DECREF(dtype); if (item == NULL) { return NULL; }