diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2019-07-23 11:54:13 -0700 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2019-07-26 11:48:32 -0700 |
commit | c53d0c42e9d44840460b02da519442f4f8285b46 (patch) | |
tree | 4442d4fd4de519440034381f18c4fbb99eedadac | |
parent | 29edf11c6ef05215b259abd86f251ebce1a436f7 (diff) | |
download | numpy-c53d0c42e9d44840460b02da519442f4f8285b46.tar.gz |
BUG: Fix reference count issue in recursive `dtype` lookup error
-rw-r--r-- | numpy/core/src/multiarray/descriptor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c index ff85c3fcb..b6c20e57a 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -102,6 +102,7 @@ _arraydescr_from_dtype_attr(PyObject *obj, PyArray_Descr **newdescr) if (Py_EnterRecursiveCall( " while trying to convert the given data type from its " "`.dtype` attribute.") != 0) { + Py_DECREF(dtypedescr); return 1; } |