diff options
author | Hugo Defois <hugo.defois@symphonyretailai.com> | 2021-07-05 16:18:34 +0200 |
---|---|---|
committer | Hugo Defois <hugo.defois@symphonyretailai.com> | 2021-07-05 16:18:34 +0200 |
commit | 0272316aa55bef9da9d21a8ad590432385bc81e3 (patch) | |
tree | ddd1563c6aa112cb30718640bcf0c2da81d1dfd0 /numpy/core | |
parent | a11945d7dc930afe47e1cf7f81cb69f2958f4c1f (diff) | |
download | numpy-0272316aa55bef9da9d21a8ad590432385bc81e3.tar.gz |
BUG: fix a leak in ufunc_object.PyUFunc_RegisterLoopForType
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/src/umath/ufunc_object.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c index 067de6990..eceb18994 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -5355,6 +5355,7 @@ PyUFunc_RegisterLoopForType(PyUFuncObject *ufunc, /* Get entry for this user-defined type*/ cobj = PyDict_GetItemWithError(ufunc->userloops, key); if (cobj == NULL && PyErr_Occurred()) { + Py_DECREF(key); return 0; } /* If it's not there, then make one and return. */ |