diff options
author | theoniko <nikolaoutheod@gmail.com> | 2021-07-03 17:25:00 +0200 |
---|---|---|
committer | theoniko <theoniko@github.com> | 2021-07-08 07:29:30 +0200 |
commit | 90047830d5d30dd64bf911c1eaf825c7553b1ade (patch) | |
tree | e103744791c2cea2af5488c9ca0d47100085cdb4 | |
parent | f128be6c671d320c84771e923ddaf6467645216f (diff) | |
download | numpy-90047830d5d30dd64bf911c1eaf825c7553b1ade.tar.gz |
BUG: Fix memory leak in function npyiter_multi_index_set
-rw-r--r-- | numpy/core/src/multiarray/number.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/number.c b/numpy/core/src/multiarray/number.c index a62776748..9ed7cde47 100644 --- a/numpy/core/src/multiarray/number.c +++ b/numpy/core/src/multiarray/number.c @@ -429,6 +429,7 @@ is_scalar_with_conversion(PyObject *o2, double* out_exponent) return NPY_NOSCALAR; } val = PyLong_AsSsize_t(value); + Py_DECREF(value); if (error_converting(val)) { PyErr_Clear(); return NPY_NOSCALAR; |