Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b32b72e

Browse files
authored
Merge pull request #19403 from theoniko/theoniko-memory-leak
BUG: Fix memory leak in function npyiter_multi_index_set
2 parents 8dde6f8 + 9004783 commit b32b72e

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)