diff options
| author | Hugo Defois <hugo.defois@symphonyretailai.com> | 2021-07-07 23:53:05 +0200 |
|---|---|---|
| committer | Sebastian Berg <sebastian@sipsolutions.net> | 2021-09-29 14:03:11 -0500 |
| commit | d594768ade744d9b5baf46d270dbb83259c906f2 (patch) | |
| tree | 397b2cc65c7d697994360c58bc0bd208eeeb939c | |
| parent | 54959ec46bc53822e119da06809306540cf6a0e5 (diff) | |
| download | numpy-d594768ade744d9b5baf46d270dbb83259c906f2.tar.gz | |
BUG: fix a PyArray_DiscoverDTypeAndShape_Recursive leak
| -rw-r--r-- | numpy/core/src/multiarray/array_coercion.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/array_coercion.c b/numpy/core/src/multiarray/array_coercion.c index 847bdafc3..8e5183424 100644 --- a/numpy/core/src/multiarray/array_coercion.c +++ b/numpy/core/src/multiarray/array_coercion.c @@ -1089,6 +1089,7 @@ PyArray_DiscoverDTypeAndShape_Recursive( } /* The cache takes ownership of the sequence here. */ if (npy_new_coercion_cache(obj, seq, 1, coercion_cache_tail_ptr, curr_dims) < 0) { + Py_DECREF(seq); return -1; } |
