Skip to content

Commit 4b97141

Browse files
author
Hugo Defois
committed
BUG: fix a leak in ufunc_object.PyUFunc_RegisterLoopForDescr
1 parent 0272316 commit 4b97141

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

numpy/core/src/umath/ufunc_object.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,6 +5218,7 @@ PyUFunc_RegisterLoopForDescr(PyUFuncObject *ufunc,
52185218

52195219
arg_typenums = PyArray_malloc(ufunc->nargs * sizeof(int));
52205220
if (arg_typenums == NULL) {
5221+
Py_DECREF(key);
52215222
PyErr_NoMemory();
52225223
return -1;
52235224
}

0 commit comments

Comments
 (0)