Skip to content

Commit 9004783

Browse files
theonikotheoniko
authored andcommitted
BUG: Fix memory leak in function npyiter_multi_index_set
1 parent f128be6 commit 9004783

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

numpy/core/src/multiarray/number.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ is_scalar_with_conversion(PyObject *o2, double* out_exponent)
429429
return NPY_NOSCALAR;
430430
}
431431
val = PyLong_AsSsize_t(value);
432+
Py_DECREF(value);
432433
if (error_converting(val)) {
433434
PyErr_Clear();
434435
return NPY_NOSCALAR;

0 commit comments

Comments
 (0)