diff options
author | Hugo Defois <hugo.defois@symphonyretailai.com> | 2021-07-05 16:37:11 +0200 |
---|---|---|
committer | Hugo Defois <hugo.defois@symphonyretailai.com> | 2021-07-05 16:37:11 +0200 |
commit | 4b971415cd44ab42f4853c3cd5639ff14a9c329d (patch) | |
tree | 961b6576f30480add26cb9ac56d4b3504ba2866a | |
parent | 0272316aa55bef9da9d21a8ad590432385bc81e3 (diff) | |
download | numpy-4b971415cd44ab42f4853c3cd5639ff14a9c329d.tar.gz |
BUG: fix a leak in ufunc_object.PyUFunc_RegisterLoopForDescr
-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 eceb18994..27d21121f 100644 --- a/numpy/core/src/umath/ufunc_object.c +++ b/numpy/core/src/umath/ufunc_object.c @@ -5218,6 +5218,7 @@ PyUFunc_RegisterLoopForDescr(PyUFuncObject *ufunc, arg_typenums = PyArray_malloc(ufunc->nargs * sizeof(int)); if (arg_typenums == NULL) { + Py_DECREF(key); PyErr_NoMemory(); return -1; } |